From 6542a0f3f483eb4fdb96bc79910a6960c47e8c48 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Thu, 1 Sep 2022 09:57:47 +0800 Subject: [PATCH] shells/guile: init devshell This is not a good devshell yet with incomplete toolset but it'll get there. --- shells/default.nix | 2 ++ shells/guile.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 shells/guile.nix 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 + ''; +}