shells/guile: init devshell

This is not a good devshell yet with incomplete toolset but it'll get
there.
This commit is contained in:
Gabriel Arazas 2022-09-01 09:57:47 +08:00
parent 881d015674
commit 6542a0f3f4
2 changed files with 28 additions and 0 deletions

View File

@ -5,6 +5,8 @@ with pkgs; {
gnu = callPackage ./gnu.nix { }; gnu = callPackage ./gnu.nix { };
gnome = callPackage ./gnome.nix { }; gnome = callPackage ./gnome.nix { };
nix = callPackage ./nix.nix { }; nix = callPackage ./nix.nix { };
guile = callPackage ./guile.nix { };
guile3 = callPackage ./guile.nix { guile = guile_3_0; };
hugo = callPackage ./hugo.nix { }; hugo = callPackage ./hugo.nix { };
rust = callPackage ./rust.nix { }; rust = callPackage ./rust.nix { };
tic-80 = callPackage ./tic-80.nix { }; tic-80 = callPackage ./tic-80.nix { };

26
shells/guile.nix Normal file
View File

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