From d49671c924e65136ad3dc7494e0c283dc02c431b Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Fri, 23 Jan 2015 10:47:55 +0100 Subject: [PATCH] haskell-ng.lib: add markBrokenVersion and appendPatch helper functions --- pkgs/development/haskell-modules/lib.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/lib.nix b/pkgs/development/haskell-modules/lib.nix index d1d69b8aac63..2989881af693 100644 --- a/pkgs/development/haskell-modules/lib.nix +++ b/pkgs/development/haskell-modules/lib.nix @@ -31,7 +31,8 @@ rec { enableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f-${x}") "-f${x}"; disableCabalFlag = drv: x: appendConfigureFlag (removeConfigureFlag drv "-f${x}") "-f-${x}"; - markBroken = drv: overrideCabal (drv: { broken = true; }); + markBroken = drv: overrideCabal drv (drv: { broken = true; }); + markBrokenVersion = version: drv: assert drv.version == version; markBroken drv; enableLibraryProfiling = drv: overrideCabal drv (drv: { enableLibraryProfiling = true; }); disableLibraryProfiling = drv: overrideCabal drv (drv: { enableLibraryProfiling = false; }); @@ -48,4 +49,7 @@ rec { enableStaticLibraries = drv: overrideCabal drv (drv: { enableStaticLibraries = true; }); disableStaticLibraries = drv: overrideCabal drv (drv: { enableStaticLibraries = false; }); + appendPatch = drv: x: appendPatches drv [x]; + appendPatches = drv: xs: overrideCabal drv (drv: { patches = (drv.patches or []) ++ xs; }); + }