git.iko.soy/typeable/nixpkgs
on master help sign in
chez: add env hook

As a follow-up to #97927, chez can now find its libraries in a nix-shell, and derivations for such libraries don't need to handle the search path themselves.

commit8f60607a0bbd7b6985e626fe65504fdffb13a6c6 authorJakub Kądziołka <kuba@kadziolka.net> dateWed 16 Sep 2020, 22:41 (6 years ago) parent33b044c
4 files changed+7−2
pkgs/development/chez-modules/chez-mit/default.nix−1 pkgs/development/chez-modules/chez-scmutils/default.nix−1 pkgs/development/compilers/chez/default.nix+2 pkgs/development/compilers/chez/setup-hook.sh+5
pkgs/development/chez-modules/chez-mit/default.nix−1
@@ -13,7 +13,6 @@ stdenv.mkDerivation {
1313 buildInputs = [ chez chez-srfi ];
1414
1515 buildPhase = ''
16− export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site
1716 make PREFIX=$out CHEZ=${chez}/bin/scheme
1817 '';
1918
pkgs/development/chez-modules/chez-scmutils/default.nix−1
@@ -13,7 +13,6 @@ stdenv.mkDerivation {
1313 buildInputs = [ chez chez-srfi chez-mit ];
1414
1515 buildPhase = ''
16− export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site:${chez-mit}/lib/csv-site
1716 make PREFIX=$out CHEZ=${chez}/bin/scheme
1817 '';
1918
pkgs/development/compilers/chez/default.nix+2
@@ -65,6 +65,8 @@ stdenv.mkDerivation rec {
6565 rm -rf $out/lib/csv${version}/examples
6666 '';
6767
68+ setupHook = ./setup-hook.sh;
69+
6870 meta = {
6971 description = "A powerful and incredibly fast R6RS Scheme compiler";
7072 homepage = "https://cisco.github.io/ChezScheme/";
pkgs/development/compilers/chez/setup-hook.shnew file+5
@@ -0,0 +1,5 @@
1+addChezLibraryPath() {
2+ addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
3+}
4+
5+addEnvHooks "$targetOffset" addChezLibraryPath