diff options
author | Jakub Kądziołka <kuba@kadziolka.net> | 2020-09-16 22:41:47 +0200 |
---|---|---|
committer | Jakub Kądziołka <kuba@kadziolka.net> | 2020-09-16 22:41:47 +0200 |
commit | 8f60607a0bbd7b6985e626fe65504fdffb13a6c6 (patch) | |
tree | 9f61040f004f3badd921fd52483f35e332b3e481 | |
parent | 33b044c4140ecf1cfea2982bc3ad2931013475d6 (diff) |
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.
4 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/chez-modules/chez-mit/default.nix b/pkgs/development/chez-modules/chez-mit/default.nix index 3942195aaa7f7..63d6ef2c676f5 100644 --- a/pkgs/development/chez-modules/chez-mit/default.nix +++ b/pkgs/development/chez-modules/chez-mit/default.nix @@ -13,7 +13,6 @@ stdenv.mkDerivation { buildInputs = [ chez chez-srfi ]; buildPhase = '' - export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site make PREFIX=$out CHEZ=${chez}/bin/scheme ''; diff --git a/pkgs/development/chez-modules/chez-scmutils/default.nix b/pkgs/development/chez-modules/chez-scmutils/default.nix index cda24f0959aa6..19fe43da49ebb 100644 --- a/pkgs/development/chez-modules/chez-scmutils/default.nix +++ b/pkgs/development/chez-modules/chez-scmutils/default.nix @@ -13,7 +13,6 @@ stdenv.mkDerivation { buildInputs = [ chez chez-srfi chez-mit ]; buildPhase = '' - export CHEZSCHEMELIBDIRS=${chez-srfi}/lib/csv-site:${chez-mit}/lib/csv-site make PREFIX=$out CHEZ=${chez}/bin/scheme ''; diff --git a/pkgs/development/compilers/chez/default.nix b/pkgs/development/compilers/chez/default.nix index 2d2e0df1ec9b4..864ccc5a7439f 100644 --- a/pkgs/development/compilers/chez/default.nix +++ b/pkgs/development/compilers/chez/default.nix @@ -65,6 +65,8 @@ stdenv.mkDerivation rec { rm -rf $out/lib/csv${version}/examples ''; + setupHook = ./setup-hook.sh; + meta = { description = "A powerful and incredibly fast R6RS Scheme compiler"; homepage = "https://cisco.github.io/ChezScheme/"; diff --git a/pkgs/development/compilers/chez/setup-hook.sh b/pkgs/development/compilers/chez/setup-hook.sh new file mode 100644 index 0000000000000..1d81489bd4e46 --- /dev/null +++ b/pkgs/development/compilers/chez/setup-hook.sh @@ -0,0 +1,5 @@ +addChezLibraryPath() { + addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site" +} + +addEnvHooks "$targetOffset" addChezLibraryPath |