Pull in hnix-store and its overlays
This commit is contained in:
parent
eae6bf542f
commit
5f1605bcbf
42
default.nix
42
default.nix
|
@ -24,23 +24,41 @@
|
||||||
, mkDerivation ? null
|
, mkDerivation ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let haskellPackages = pkgs.haskell.packages.${compiler};
|
let
|
||||||
|
|
||||||
|
hnix-store-src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "haskell-nix";
|
||||||
|
repo = "hnix-store";
|
||||||
|
rev = "440dfebc288eee184925292a740758e238b6d2ef";
|
||||||
|
sha256 = "12pzj10l4kcrp8kj83ww7w2g6zk897r8hmki94v6653pbx4b7w1f";
|
||||||
|
};
|
||||||
|
|
||||||
|
overlay = pkgs.lib.foldr pkgs.lib.composeExtensions (_: _: {}) [
|
||||||
|
(import "${hnix-store-src}/overlay.nix")
|
||||||
|
(self: super: with pkgs.haskell.lib; {
|
||||||
|
mono-traversable = dontCheck super.mono-traversable;
|
||||||
|
these = doJailbreak super.these;
|
||||||
|
} // pkgs.lib.optionalAttrs withHoogle {
|
||||||
|
ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
|
||||||
|
ghcWithPackages = self.ghc.withPackages;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
overrideHaskellPackages = orig: {
|
||||||
|
buildHaskellPackages =
|
||||||
|
orig.buildHaskellPackages.override overrideHaskellPackages;
|
||||||
|
overrides = if orig ? overrides
|
||||||
|
then pkgs.lib.composeExtensions orig.overrides overlay
|
||||||
|
else overlay;
|
||||||
|
};
|
||||||
|
|
||||||
|
haskellPackages = pkgs.haskell.packages.${compiler}.override
|
||||||
|
overrideHaskellPackages;
|
||||||
|
|
||||||
drv = haskellPackages.developPackage {
|
drv = haskellPackages.developPackage {
|
||||||
name = "hnix";
|
name = "hnix";
|
||||||
root = ./.;
|
root = ./.;
|
||||||
|
|
||||||
overrides = with pkgs.haskell.lib; self: super: {
|
|
||||||
mono-traversable = dontCheck super.mono-traversable;
|
|
||||||
these = doJailbreak super.these;
|
|
||||||
} //
|
|
||||||
(if withHoogle then {
|
|
||||||
ghc = super.ghc // { withPackages = super.ghc.withHoogle; };
|
|
||||||
ghcWithPackages = self.ghc.withPackages;
|
|
||||||
} else {});
|
|
||||||
|
|
||||||
source-overrides = {};
|
|
||||||
|
|
||||||
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
|
modifier = drv: pkgs.haskell.lib.overrideCabal drv (attrs: {
|
||||||
buildTools = (attrs.buildTools or []) ++ [
|
buildTools = (attrs.buildTools or []) ++ [
|
||||||
haskellPackages.cabal-install
|
haskellPackages.cabal-install
|
||||||
|
|
Loading…
Reference in a new issue