From f1a52ab0b850f502ab7d74906d599509da659570 Mon Sep 17 00:00:00 2001 From: Trolli Schmittlauch Date: Wed, 18 Mar 2020 23:53:43 +0100 Subject: [PATCH] re-structure Nix environment to make use of compiler and nixpkgs pinning --- Hash2Pub/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Hash2Pub/default.nix b/Hash2Pub/default.nix index d3107d3..938bcc0 100644 --- a/Hash2Pub/default.nix +++ b/Hash2Pub/default.nix @@ -1,15 +1,23 @@ -{ pkgs ? import {} }: +{ 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