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.
This commit is contained in:
Jakub Kądziołka 2020-09-16 22:41:47 +02:00
parent 33b044c414
commit 8f60607a0b
No known key found for this signature in database
GPG key ID: E315A75846131564
4 changed files with 7 additions and 2 deletions

View file

@ -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
'';

View file

@ -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
'';

View file

@ -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/";

View file

@ -0,0 +1,5 @@
addChezLibraryPath() {
addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site"
}
addEnvHooks "$targetOffset" addChezLibraryPath