Hash2Pub/Hash2Pub/default.nix

30 lines
661 B
Nix

{ pkgs ? import (
builtins.fetchGit {
name = "nixpkgs-pinned";
url = https://github.com/NixOS/nixpkgs/;
ref = "refs/heads/release-20.03";
rev = "08bd71704950d1dddcd55ddbf58adbd045e0ae50";
#rev = "6bbdce2b15665af6310069cc4f1e667e426c4356";
}) {},
compiler ? "ghc865"
}:
let
hp = pkgs.haskell.packages."${compiler}";
src = pkgs.nix-gitignore.gitignoreSource [] ./.;
drv = hp.callCabal2nix "Hash2Pub" "${src}/Hash2Pub.cabal" {};
in
{
my_project = drv;
shell = hp.shellFor {
withHoogle = true;
packages = p: [ drv ];
buildInputs = with hp;
[
haddock
cabal-install
hlint
];
};
}