forked from schmittlauch/Hash2Pub
re-structure Nix environment to make use of compiler and nixpkgs pinning
This commit is contained in:
parent
523c33482c
commit
f1a52ab0b8
|
@ -1,15 +1,23 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
{ pkgs ? import (
|
||||
builtins.fetchGit {
|
||||
name = "nixpkgs-pinned";
|
||||
url = https://github.com/NixOS/nixpkgs/;
|
||||
ref = "refs/heads/release-20.03";
|
||||
rev = "6bbdce2b15665af6310069cc4f1e667e426c4356";
|
||||
}) {},
|
||||
compiler ? "ghc865"
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (pkgs) haskellPackages;
|
||||
drv = haskellPackages.callCabal2nix "Hash2Pub" ./. {};
|
||||
hp = pkgs.haskell.packages."${compiler}";
|
||||
drv = hp.callCabal2nix "Hash2Pub" ./. {};
|
||||
in
|
||||
{
|
||||
my_project = drv;
|
||||
shell = haskellPackages.shellFor {
|
||||
shell = hp.shellFor {
|
||||
withHoogle = true;
|
||||
packages = p: [ drv ];
|
||||
buildInputs = with pkgs.haskellPackages;
|
||||
buildInputs = with hp;
|
||||
[
|
||||
haddock
|
||||
cabal-install
|
||||
|
|
Loading…
Reference in a new issue