restructure nix development environment, now with Hoogle

This commit is contained in:
Trolli Schmittlauch 2020-03-04 15:29:35 +01:00
parent 6329f815d1
commit 30cfed81ea
2 changed files with 20 additions and 11 deletions

19
src/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
let
inherit (pkgs) haskellPackages;
drv = haskellPackages.callCabal2nix "Hash2Pub" ./Hash2Pub {};
in
{
my_project = drv;
shell = haskellPackages.shellFor {
withHoogle = true;
packages = p: [ drv ];
buildInputs = with pkgs.haskellPackages;
[
haddock
cabal-install
hlint
];
};
}

View file

@ -1,11 +1 @@
let (import ./. {}).shell
pkgs = import <nixpkgs> {};
in
pkgs.haskellPackages.developPackage {
root = ./Hash2Pub;
modifier = drv:
pkgs.haskell.lib.addBuildTools drv (with pkgs.haskellPackages;
[ cabal-install
haddock
]);
}