From 0273032031dd82e98a9084e09b6ee32aa82401bb Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 18 Dec 2024 07:10:43 +0000 Subject: [PATCH] Add raku devshell --- devshells/raku.nix | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 1 + 2 files changed, 42 insertions(+) create mode 100644 devshells/raku.nix diff --git a/devshells/raku.nix b/devshells/raku.nix new file mode 100644 index 0000000..0cce9d3 --- /dev/null +++ b/devshells/raku.nix @@ -0,0 +1,41 @@ +{ withSystem, inputs, ... }: +{ + perSystem = + { + config, + pkgs, + lib, + inputs', + ... + }: + { + devShells.raku = + let + rakudo_env = pkgs.buildEnv { + name = "rakudo-env"; + paths = with pkgs; [ + rakudo + zef + ]; + pathsToLink = [ + "/bin" + "/lib" + "/share" + ]; + }; + libPackages = with pkgs; [ readline70 ]; + in + pkgs.mkShell { + buildInputs = + with pkgs; + [ + # Raku toolchain + rakudo_env + ] + ++ libPackages; + shellHook = '' + export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages} + ''; + }; + }; +} diff --git a/flake.nix b/flake.nix index 15b54d4..c13f841 100644 --- a/flake.nix +++ b/flake.nix @@ -26,6 +26,7 @@ ./home-manager/machines/wsl/home.nix ./devshells/rust.nix ./devshells/idris2.nix + ./devshells/raku.nix ]; systems = [ "x86_64-linux"