Created
February 29, 2020 10:47
-
-
Save idontgetoutmuch/46371ed51043a7dd9fa25ab5bb6ba67b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
myHaskellPackageOverlay = self: super: { | |
haskellPackages = super.haskellPackages.override { | |
overrides = hself: hsuper: { | |
mkDerivation = args: hsuper.mkDerivation (args // { | |
doCheck = false; | |
doHaddock = false; | |
jailbreak = true; | |
}); | |
splitmix = self.fetchFromGitHub { | |
owner = "phadej"; | |
repo = "splitmix"; | |
rev = "fcf2d95181c0d4c39dbaf80cd28b6498f24e5f74"; | |
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kh"; | |
}; | |
random = | |
let newRandomSrc = builtins.fetchGit { | |
url = "https://github.com/idontgetoutmuch/random.git"; | |
rev = "83262ccd8a2d4b8f29b14c535b6bdf997bc7a497"; | |
ref = "interface-to-performance"; | |
}; | |
in | |
# Since cabal2nix has a transitive dependency on random, we need to | |
# get the callCabal2nix function from the normal haskellPackages that | |
# is not being overridden. | |
(import <nixpkgs> {}).haskell.lib.dontCheck ((import <nixpkgs> {}).haskellPackages.callCabal2nix "random" newRandomSrc { }); | |
}; | |
}; | |
}; | |
in | |
{ pkgs ? import <nixpkgs> { overlays = [ myHaskellPackageOverlay ]; }, doBenchmark ? false }: | |
let | |
foo = pkgs.fetchFromGitHub { | |
owner = "phadej"; | |
repo = "splitmix"; | |
rev = "fcf2d95181c0d4c39dbaf80cd28b6498f24e5f74"; | |
sha256 = "1cw5fszffl5pkpa6s6wjnkiv6lm5k618s32sp60kvmvpy7a2v9kh"; | |
}; | |
haskellDeps = ps: with ps; [ | |
random # (pkgs.haskell.lib.dontCheck random) | |
foo # (pkgs.haskell.lib.doJailbreak splitmix) | |
]; | |
in | |
pkgs.stdenv.mkDerivation { | |
name = "env"; | |
buildInputs = [ | |
(pkgs.haskellPackages.ghcWithPackages haskellDeps) | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment