summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/configuration-common.nix
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-16 23:45:18 +0100
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2021-03-17 00:47:26 +0100
commitb8c710490cac44e183da7256070ba204c6cc569c (patch)
treedf6b8bb4d5ed696f1d6f4d1e94401bb59da727e2 /pkgs/development/haskell-modules/configuration-common.nix
parentc76cb7cbb91d8e67d0a2fe1092b29048315fd9cc (diff)
downloadnixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar.gz
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar.bz2
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar.lz
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar.xz
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.tar.zst
nixpkgs-b8c710490cac44e183da7256070ba204c6cc569c.zip
haskellPackages.spacecookie: enable extra tests, install man pages
Add an override to configuration-common.nix adding the following
features to the derivation:

* Let test suite discover the built spacecookie binary, so it doesn't
  skip integration tests (which are very cheap and take just over 1s).
* Install man pages shipped in the sdist. (If someone is eager to get
  rid of this override feel free to explain to me how to achieve this
  without a Custom build-type which pulls in thousands of modules from
  Cabal. :p)
Diffstat (limited to 'pkgs/development/haskell-modules/configuration-common.nix')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index a25efff89f7..87c02e07776 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -1664,4 +1664,16 @@ self: super: {
   # Test suite does not compile.
   feed = dontCheck super.feed;
 
+  spacecookie = overrideCabal super.spacecookie (old: {
+    buildTools = (old.buildTools or []) ++ [ pkgs.installShellFiles ];
+    # let testsuite discover the resulting binary
+    preCheck = ''
+      export SPACECOOKIE_TEST_BIN=./dist/build/spacecookie/spacecookie
+    '' + (old.preCheck or "");
+    # install man pages shipped in the sdist
+    postInstall = ''
+      installManPage docs/man/*
+    '' + (old.postInstall or "");
+  });
+
 } // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super