Skip to content

Commit fe1b21c

Browse files
Merge pull request #666 from NixOS/kill-some-post-processing
FromCabal.PostProcess: remove some hooks no longer applicable to Nixpkgs
2 parents a63697c + 5a04e6c commit fe1b21c

File tree

3 files changed

+2
-34
lines changed

3 files changed

+2
-34
lines changed

cabal2nix/src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ hooks =
146146
, ("mysql", set (libraryDepends . system . contains (pkg "libmysqlclient")) True)
147147
, ("network-attoparsec", set doCheck False) -- test suite requires network access
148148
, ("numeric-qq", set doCheck False) -- test suite doesn't finish even after 1+ days
149-
, ("opencv", opencvOverrides)
150-
, ("pandoc >= 1.16.0.2 && < 2.5", set doCheck False) -- https://github.com/jgm/pandoc/issues/2709 and https://github.com/fpco/stackage/issues/1332
151-
, ("pandoc < 2.6", pandocPre26Overrides)
152-
, ("pandoc >= 2.6 && < 3.1.10", pandocPre3110Overrides) -- https://github.com/jgm/pandoc/commit/55227a20273267c236ec039c3e6559287a1dca45
153-
, ("pandoc-citeproc", set doCheck False) -- https://github.com/jgm/pandoc-citeproc/issues/369
154149
, ("purescript", set doCheck False) -- test suite doesn't cope with Nix build env
155150
, ("proto-lens-protobuf-types", set (libraryDepends . tool . contains (pkg "protobuf")) True)
156151
, ("proto-lens-protoc", set (libraryDepends . tool . contains (pkg "protobuf")) True)
@@ -321,10 +316,6 @@ hfseventsOverrides
321316
. set (metaSection . platforms) (Just $ Set.singleton (NixpkgsPlatformGroup (ident # "darwin")))
322317
. over (libraryDepends . haskell) (Set.union (Set.fromList (map bind ["self.base", "self.cereal", "self.mtl", "self.text", "self.bytestring"])))
323318

324-
opencvOverrides :: Derivation -> Derivation
325-
opencvOverrides = set phaseOverrides "hardeningDisable = [ \"bindnow\" ];"
326-
. over (libraryDepends . pkgconfig) (replace (pkg "opencv") (pkg "opencv3"))
327-
328319
hspecCoreOverrides :: Derivation -> Derivation -- https://github.com/hspec/hspec/issues/330
329320
hspecCoreOverrides = set testFlags [ "--skip", "'Test.Hspec.Core.Runner.hspecResult runs specs in parallel'" ]
330321

@@ -348,24 +339,6 @@ gtkglextHook = over (libraryDepends . system) (Set.union (Set.fromList deps))
348339
, "pkgs.xorg.libXmu"
349340
]
350341

351-
pandocPre26Overrides :: Derivation -> Derivation
352-
pandocPre26Overrides = set phaseOverrides postInstall
353-
where
354-
postInstall = unlines [ "postInstall = ''"
355-
, " mkdir -p $out/share"
356-
, " mv $data/*/*/man $out/share/"
357-
, "'';"
358-
]
359-
360-
pandocPre3110Overrides :: Derivation -> Derivation
361-
pandocPre3110Overrides = set phaseOverrides postInstall
362-
where
363-
postInstall = unlines [ "postInstall = ''"
364-
, " mkdir -p $out/share/man/man1"
365-
, " mv \"man/\"*.1 $out/share/man/man1/"
366-
, "'';"
367-
]
368-
369342
bustleOverrides :: Derivation -> Derivation
370343
bustleOverrides = set (libraryDepends . pkgconfig . contains "system-glib = pkgs.glib") True
371344
. set (executableDepends . pkgconfig . contains "gio-unix = null") False

cabal2nix/test/golden-test-cases/opencv.nix.golden

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ mkDerivation, aeson, base, base64-bytestring, bindings-DSL
22
, bytestring, Cabal, containers, criterion, data-default, deepseq
33
, directory, Glob, haskell-src-exts, inline-c, inline-c-cpp
4-
, JuicyPixels, lens, lib, linear, opencv3, primitive, QuickCheck
4+
, JuicyPixels, lens, lib, linear, opencv, primitive, QuickCheck
55
, repa, tasty, tasty-hunit, tasty-quickcheck, template-haskell
66
, text, transformers, vector
77
}:
@@ -15,15 +15,14 @@ mkDerivation {
1515
data-default deepseq inline-c inline-c-cpp JuicyPixels linear
1616
primitive repa template-haskell text transformers vector
1717
];
18-
libraryPkgconfigDepends = [ opencv3 ];
18+
libraryPkgconfigDepends = [ opencv ];
1919
testHaskellDepends = [
2020
base bytestring containers data-default directory Glob
2121
haskell-src-exts JuicyPixels lens linear primitive QuickCheck repa
2222
tasty tasty-hunit tasty-quickcheck template-haskell text
2323
transformers vector
2424
];
2525
benchmarkHaskellDepends = [ base bytestring criterion repa ];
26-
hardeningDisable = [ "bindnow" ];
2726
homepage = "https://github.com/LumiGuide/haskell-opencv";
2827
description = "Haskell binding to OpenCV-3.x";
2928
license = lib.licenses.bsd3;

cabal2nix/test/golden-test-cases/pandoc.nix.golden

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ mkDerivation {
4747
benchmarkHaskellDepends = [
4848
base bytestring deepseq mtl tasty-bench text
4949
];
50-
postInstall = ''
51-
mkdir -p $out/share/man/man1
52-
mv "man/"*.1 $out/share/man/man1/
53-
'';
5450
homepage = "https://pandoc.org";
5551
description = "Conversion between markup formats";
5652
license = lib.licenses.gpl2Plus;

0 commit comments

Comments
 (0)