dev-templates/purescript/flake.nix

44 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2022-12-21 07:04:57 -08:00
{
description = "A Nix-flake-based Purescript development environment";
inputs = {
2023-03-06 03:28:29 -08:00
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
2022-12-21 07:04:57 -08:00
flake-utils.url = "github:numtide/flake-utils";
easy-purescript-nix = {
url = "github:justinwoo/easy-purescript-nix";
flake = false;
};
};
2023-03-06 03:28:29 -08:00
2022-12-21 07:04:57 -08:00
outputs =
{ self
, nixpkgs
, flake-utils
, easy-purescript-nix
}:
2023-03-06 03:28:29 -08:00
2022-12-21 07:04:57 -08:00
flake-utils.lib.eachDefaultSystem (system:
let
2023-03-06 03:28:29 -08:00
pkgs = import nixpkgs { inherit system; };
2022-12-21 07:04:57 -08:00
easy-ps = import easy-purescript-nix { inherit pkgs; };
in
{
devShells.default = pkgs.mkShell {
2023-03-06 03:28:29 -08:00
packages = (with pkgs; [ nodejs ]) ++ (with easy-ps; [
purs
spago
purescript-language-server
purs-tidy
]);
shellHook = with easy-ps; ''
echo "Purs `${purs}/bin/purs --version`"
echo "Spago `${spago}/bin/spago --version`"
echo "Purescript Language Server `${purescript-language-server}/bin/purescript-language-server --version`"
echo "Purs Tidy `${purs-tidy}/bin/purs-tidy --version`"
2022-12-21 07:04:57 -08:00
echo "Node.js `${pkgs.nodejs}/bin/node --version`"
'';
};
});
}