haskell: use postPatch instead of patchPhase where possible
Closes https://github.com/NixOS/nixpkgs/pull/9297.
This commit is contained in:
parent
d8650d5d6c
commit
1a590a6185
|
@ -166,7 +166,7 @@ self: super: {
|
|||
# Jailbreak doesn't get the job done because the Cabal file uses conditionals a lot.
|
||||
darcs = (overrideCabal super.darcs (drv: {
|
||||
doCheck = false; # The test suite won't even start.
|
||||
patchPhase = "sed -i -e 's|attoparsec .*,|attoparsec,|' -e 's|vector .*,|vector,|' darcs.cabal";
|
||||
postPatch = "sed -i -e 's|attoparsec .*,|attoparsec,|' -e 's|vector .*,|vector,|' darcs.cabal";
|
||||
})).overrideScope (self: super: { zlib = self.zlib_0_5_4_2; });
|
||||
|
||||
# https://github.com/massysett/rainbox/issues/1
|
||||
|
@ -206,7 +206,7 @@ self: super: {
|
|||
x509-system = if pkgs.stdenv.isDarwin && !pkgs.stdenv.cc.nativeLibc
|
||||
then let inherit (pkgs.darwin) security_tool;
|
||||
in pkgs.lib.overrideDerivation (addBuildDepend super.x509-system security_tool) (drv: {
|
||||
patchPhase = (drv.patchPhase or "") + ''
|
||||
postPatch = (drv.postPatch or "") + ''
|
||||
substituteInPlace System/X509/MacOS.hs --replace security ${security_tool}/bin/security
|
||||
'';
|
||||
})
|
||||
|
@ -216,7 +216,7 @@ self: super: {
|
|||
then super.double-conversion
|
||||
else overrideCabal super.double-conversion (drv:
|
||||
{
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
substituteInPlace double-conversion.cabal --replace stdc++ c++
|
||||
'';
|
||||
});
|
||||
|
@ -721,7 +721,7 @@ self: super: {
|
|||
|
||||
# Already fixed in upstream darcs repo.
|
||||
xmonad-contrib = overrideCabal super.xmonad-contrib (drv: {
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
sed -i -e '24iimport Control.Applicative' XMonad/Util/Invisible.hs
|
||||
sed -i -e '22iimport Control.Applicative' XMonad/Hooks/DebugEvents.hs
|
||||
'';
|
||||
|
@ -732,7 +732,7 @@ self: super: {
|
|||
|
||||
# Hardcoded include path
|
||||
poppler = overrideCabal super.poppler (drv: {
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
sed -i -e 's,glib/poppler.h,poppler.h,' poppler.cabal
|
||||
sed -i -e 's,glib/poppler.h,poppler.h,' Graphics/UI/Gtk/Poppler/Structs.hsc
|
||||
'';
|
||||
|
|
|
@ -90,10 +90,10 @@ self: super: {
|
|||
|
||||
# Setup: At least the following dependencies are missing: base <4.8
|
||||
hspec-expectations = overrideCabal super.hspec-expectations (drv: {
|
||||
patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
});
|
||||
utf8-string = overrideCabal super.utf8-string (drv: {
|
||||
patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
});
|
||||
pointfree = doJailbreak super.pointfree;
|
||||
|
||||
|
|
|
@ -85,8 +85,8 @@ self: super: {
|
|||
|
||||
# https://github.com/magthe/sandi/issues/7
|
||||
sandi = overrideCabal super.sandi (drv: {
|
||||
patchPhase = "sed -i -e 's|base ==4.8.*,|base,|' sandi.cabal"; }
|
||||
);
|
||||
postPatch = "sed -i -e 's|base ==4.8.*,|base,|' sandi.cabal";
|
||||
});
|
||||
|
||||
# blaze-builder requires an additional build input on older compilers.
|
||||
blaze-builder = addBuildDepend super.blaze-builder super.bytestring-builder;
|
||||
|
|
|
@ -127,8 +127,8 @@ self: super: {
|
|||
|
||||
# https://github.com/magthe/sandi/issues/7
|
||||
sandi = overrideCabal super.sandi (drv: {
|
||||
patchPhase = "sed -i -e 's|base ==4.8.*,|base,|' sandi.cabal"; }
|
||||
);
|
||||
postPatch = "sed -i -e 's|base ==4.8.*,|base,|' sandi.cabal";
|
||||
});
|
||||
|
||||
# Overriding mtl 2.2.x is fine here because ghc-events is an stand-alone executable.
|
||||
ghc-events = super.ghc-events.override { mtl = self.mtl_2_2_1; };
|
||||
|
|
|
@ -66,10 +66,10 @@ self: super: {
|
|||
|
||||
# Setup: At least the following dependencies are missing: base <4.8
|
||||
hspec-expectations = overrideCabal super.hspec-expectations (drv: {
|
||||
patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
});
|
||||
utf8-string = overrideCabal super.utf8-string (drv: {
|
||||
patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
});
|
||||
|
||||
# bos/attoparsec#92
|
||||
|
|
|
@ -65,10 +65,10 @@ self: super: {
|
|||
|
||||
# Setup: At least the following dependencies are missing: base <4.8
|
||||
hspec-expectations = overrideCabal super.hspec-expectations (drv: {
|
||||
patchPhase = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
postPatch = "sed -i -e 's|base < 4.8|base|' hspec-expectations.cabal";
|
||||
});
|
||||
utf8-string = overrideCabal super.utf8-string (drv: {
|
||||
patchPhase = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
postPatch = "sed -i -e 's|base >= 3 && < 4.8|base|' utf8-string.cabal";
|
||||
});
|
||||
|
||||
# bos/attoparsec#92
|
||||
|
|
|
@ -56,7 +56,7 @@ self: super: {
|
|||
vector = null;
|
||||
|
||||
pqueue = overrideCabal super.pqueue (drv: {
|
||||
patchPhase = ''
|
||||
postPatch = ''
|
||||
sed -i -e '12s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
||||
sed -i -e '64s|null|Data.PQueue.Internals.null|' Data/PQueue/Internals.hs
|
||||
sed -i -e '32s|null|Data.PQueue.Internals.null|' Data/PQueue/Min.hs
|
||||
|
|
Loading…
Reference in a new issue