Created
February 26, 2020 17:42
-
-
Save idontgetoutmuch/b02458d0a22f23d6c9acf5c2fa794e75 to your computer and use it in GitHub Desktop.
This file contains 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: { | |
random = | |
let newRandomSrc = builtins.fetchGit { | |
url = "file:///Users/dom/random"; | |
rev = "85a6dd013283437c05ab99498fc2f7351d5c504a"; | |
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 { }); | |
}; | |
}; | |
}; | |
noCheckOvelay = self: super: { | |
mkDerivation = args: super.mkDerivation (args // { | |
doCheck = false; | |
}); | |
}; | |
activeOverlays = [ noCheckOvelay ]; | |
foo = builtins.foldl' (pkgs: overlay: pkgs.extend overlay) nixpkgs.haskellPackages activeOverlays; | |
nixpkgs = import <nixpkgs> { overlays = [ myHaskellPackageOverlay ]; }; | |
in | |
# This example derivation file is assumed to be in the current directory. "./default.nix" is | |
# the current file you are looking at. | |
import ./default.nix { | |
reverseDepsOf = "random"; | |
inherit nixpkgs; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment