pkgs/development/haskell-modules/lib.nix: add funky helper function for overriding
This commit is contained in:
parent
0a80cf9e51
commit
55003ca34b
@ -1,6 +1,6 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with import ./lib.nix;
|
with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with import ./lib.nix;
|
with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with import ./lib.nix;
|
with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with import ./lib.nix;
|
with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
|
|
||||||
with import ./lib.nix;
|
with import ./lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
self: super: {
|
self: super: {
|
||||||
|
|
||||||
|
@ -1,7 +1,26 @@
|
|||||||
{
|
{ pkgs }:
|
||||||
|
|
||||||
|
rec {
|
||||||
|
|
||||||
overrideCabal = drv: f: drv.override (args: args // {
|
overrideCabal = drv: f: drv.override (args: args // {
|
||||||
mkDerivation = drv: args.mkDerivation (drv // f drv);
|
mkDerivation = drv: args.mkDerivation (drv // f drv);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
doHaddock = drv: overrideCabal drv (drv: { noHaddock = false; });
|
||||||
|
dontHaddock = drv: overrideCabal drv (drv: { noHaddock = true; });
|
||||||
|
|
||||||
|
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });
|
||||||
|
dontJailbreak = drv: overrideCabal drv (drv: { jailbreak = false; });
|
||||||
|
|
||||||
|
doCheck = drv: overrideCabal drv (drv: { doCheck = false; });
|
||||||
|
dontCheck = drv: overrideCabal drv (drv: { doCheck = false; });
|
||||||
|
|
||||||
|
dontDistribute = drv: overrideCabal drv (drv: { hydraPlatforms = []; });
|
||||||
|
|
||||||
|
appendConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = drv.configureFlags or [] ++ [x]; });
|
||||||
|
removeConfigureFlag = drv: x: overrideCabal drv (drv: { configureFlags = pkgs.stdenv.lib.remove x (drv.configureFlags or []); });
|
||||||
|
|
||||||
|
enableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f-${x}") "-f${x}";
|
||||||
|
disableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f${x}") "-f-${x}";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
rec {
|
rec {
|
||||||
|
|
||||||
|
lib = import ../development/haskell-modules/lib.nix { inherit pkgs; };
|
||||||
|
|
||||||
compiler = {
|
compiler = {
|
||||||
|
|
||||||
ghc6102Binary = callPackage ../development/compilers/ghc/6.10.2-binary.nix { gmp = pkgs.gmp4; };
|
ghc6102Binary = callPackage ../development/compilers/ghc/6.10.2-binary.nix { gmp = pkgs.gmp4; };
|
||||||
|
Loading…
Reference in New Issue
Block a user