Browse Source

nix: Added a repl

completed
Craige McWhirter 7 months ago
parent
commit
9199a5d5a9
Signed by: craige GPG Key ID: 7DBA9F5689EFB6AA
  1. 11
      flake.nix

11
flake.nix

@ -8,6 +8,7 @@
outputs = { self, nixpkgs, utils, haskellNix }:
utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
inherit (utils.lib) mkApp;
overlays = [ haskellNix.overlay
(final: prev: {
# This overlay adds our project to pkgs
@ -30,5 +31,15 @@
haskell-language-server = "latest";
};
};
apps = {
repl = mkApp {
drv = pkgs.writeShellScriptBin "repl" ''
confnix=$(mktemp)
echo "builtins.getFlake (toString $(git rev-parse --show-toplevel))" >$confnix
trap "rm $confnix" EXIT
nix repl $confnix
'';
};
};
});
}
Loading…
Cancel
Save