System/devshells/idris2.nix

49 lines
1 KiB
Nix

{ withSystem, inputs, ... }:
{
perSystem =
{
config,
pkgs,
lib,
inputs',
...
}:
{
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}
'';
};
};
}