aboutsummaryrefslogtreecommitdiff
path: root/pkgs/dev/default.nix
blob: 9238f4d4a6ded01203a296d102cabc79a750a673 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenvNoCC
, makeShellWrapper, bash, nix
, devShells
}:

with lib;

let

  shells = concatStringsSep ":" (mapAttrsToList (n: v: "${n}=${v}") devShells);

in stdenvNoCC.mkDerivation rec {
  name = "personal-devshells";
  src = ./.;

  nativeBuildInputs = [ makeShellWrapper ];
  installPhase = ''
    makeShellWrapper ${./dev.sh} $out/bin/dev \
      --prefix PATH : ${lib.makeBinPath [ bash nix ]} \
      --set DEV_SHELLS "${shells}" \
      --set DEV_FLAKE "${../..}"
  '';

  meta = with lib; {
    description = "Console version of Stardict program";
    homepage = "https://dushistov.github.io/sdcv/";
    license = licenses.gpl2;
  };
}