re-structure Nix environment to make use of compiler and nixpkgs pinning

This commit is contained in:
Trolli Schmittlauch 2020-03-18 23:53:43 +01:00
parent 523c33482c
commit f1a52ab0b8

View file

@ -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 let
inherit (pkgs) haskellPackages; hp = pkgs.haskell.packages."${compiler}";
drv = haskellPackages.callCabal2nix "Hash2Pub" ./. {}; drv = hp.callCabal2nix "Hash2Pub" ./. {};
in in
{ {
my_project = drv; my_project = drv;
shell = haskellPackages.shellFor { shell = hp.shellFor {
withHoogle = true; withHoogle = true;
packages = p: [ drv ]; packages = p: [ drv ];
buildInputs = with pkgs.haskellPackages; buildInputs = with hp;
[ [
haddock haddock
cabal-install cabal-install