gecco/flake.nix

24 lines
688 B
Nix

{
description = "A bare minimum Haskell flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (sys:
let pkgs = import nixpkgs { system = sys; };
hpkgs = pkgs.haskell.packages.ghc965;
project = (hpkgs.callCabal2nix "gecco" ./. {}).overrideAttrs (old: old // {
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.llvm_15 ];
});
in {
packages.default = project;
devShells.default = pkgs.mkShell {
packages = [ hpkgs.cabal-install ];
inputsFrom = [ project.env ];
};
}
);
}