diff --git a/shells/default.nix b/shells/default.nix index 3ade4803..8284ff52 100644 --- a/shells/default.nix +++ b/shells/default.nix @@ -5,6 +5,8 @@ with pkgs; { gnu = callPackage ./gnu.nix { }; gnome = callPackage ./gnome.nix { }; nix = callPackage ./nix.nix { }; + guile = callPackage ./guile.nix { }; + guile3 = callPackage ./guile.nix { guile = guile_3_0; }; hugo = callPackage ./hugo.nix { }; rust = callPackage ./rust.nix { }; tic-80 = callPackage ./tic-80.nix { }; diff --git a/shells/guile.nix b/shells/guile.nix new file mode 100644 index 00000000..c57ad181 --- /dev/null +++ b/shells/guile.nix @@ -0,0 +1,26 @@ +{ mkShell +, lib +, guile +, guile-hall +}: + +let + guileVersion = lib.versions.majorMinor guile.version; +in +mkShell { + inherit guileVersion; + packages = [ + guile + guile-hall + ]; + + # This is already properly exported through setup hooks but to make + # intentions clearer. + shellHook = '' + export GUILE_LOAD_PATH GUILE_LOAD_COMPILED_PATH + + if test $guileVersion == "3.0"; then + export GUILE_EXTENSIONS_PATH + fi + ''; +}