diff --git a/devshells/idris2.nix b/devshells/idris2.nix index 9f873c4..ed2ed75 100644 --- a/devshells/idris2.nix +++ b/devshells/idris2.nix @@ -4,21 +4,45 @@ { config, pkgs, + lib, inputs', ... }: { - devShells.idris2 = pkgs.mkShell { - buildInputs = with pkgs; [ - # Idris toolchain - inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack - inputs'.nixpkgs-unstable.legacyPackages.idris2 - pkg-config - gmp - gnumake - chez - rlwrap - ]; - }; + devShells.idris2 = + 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; + [ + # Idris toolchain + inputs'.nixpkgs-unstable.legacyPackages.idris2Packages.pack + inputs'.nixpkgs-unstable.legacyPackages.idris2 + pkg-config + gmp + gnumake + chez + rlwrap + rakudo_env + ] + ++ libPackages; + shellHook = '' + export LD_LIBRARY_PATH=${lib.makeLibraryPath libPackages} + ''; + }; }; }