diff options
author | Karel Kočí <cynerd@email.cz> | 2022-11-02 11:52:15 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2022-11-02 11:52:15 +0100 |
commit | 6d36062fcd49fff7ca6f7dc9b4a40d2fcb48725e (patch) | |
tree | e5c147c81b5fe5881aa4b2dcdd7a849299587d65 | |
parent | 576d9f3a20322f6e0ca67675f5578f01ec73271b (diff) | |
download | nixos-personal-6d36062fcd49fff7ca6f7dc9b4a40d2fcb48725e.tar.gz nixos-personal-6d36062fcd49fff7ca6f7dc9b4a40d2fcb48725e.tar.bz2 nixos-personal-6d36062fcd49fff7ca6f7dc9b4a40d2fcb48725e.zip |
pkgs/dev: use DRV instead of Nix sources
This should make evaluation faster.
-rw-r--r-- | pkgs/dev/default.nix | 13 | ||||
-rwxr-xr-x | pkgs/dev/dev.sh | 4 |
2 files changed, 6 insertions, 11 deletions
diff --git a/pkgs/dev/default.nix b/pkgs/dev/default.nix index 9238f4d..d9b7d52 100644 --- a/pkgs/dev/default.nix +++ b/pkgs/dev/default.nix @@ -7,7 +7,9 @@ with lib; let - shells = concatStringsSep ":" (mapAttrsToList (n: v: "${n}=${v}") devShells); + shells = concatStringsSep ":" (mapAttrsToList ( + n: v: "${n}=${v.drvPath}=${v}" + ) devShells); in stdenvNoCC.mkDerivation rec { name = "personal-devshells"; @@ -17,13 +19,6 @@ in stdenvNoCC.mkDerivation rec { installPhase = '' makeShellWrapper ${./dev.sh} $out/bin/dev \ --prefix PATH : ${lib.makeBinPath [ bash nix ]} \ - --set DEV_SHELLS "${shells}" \ - --set DEV_FLAKE "${../..}" + --set DEV_SHELLS "${shells}" ''; - - meta = with lib; { - description = "Console version of Stardict program"; - homepage = "https://dushistov.github.io/sdcv/"; - license = licenses.gpl2; - }; } diff --git a/pkgs/dev/dev.sh b/pkgs/dev/dev.sh index f88224a..23b1fae 100755 --- a/pkgs/dev/dev.sh +++ b/pkgs/dev/dev.sh @@ -5,9 +5,9 @@ target="$1" shift known_shells="$(tr ':' '\n' <<<"${DEV_SHELLS:-}")" -while IFS='=' read name val; do +while IFS='=' read name drv res; do if [ "$target" == "$name" ]; then - target="$DEV_FLAKE#$name" + target="$drv#$name" break fi done <<<"$known_shells" |