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
|
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
|
||||||
|
|
Loading…
Reference in a new issue