From b8c710490cac44e183da7256070ba204c6cc569c Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Tue, 16 Mar 2021 23:45:18 +0100 Subject: [PATCH] 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) --- .../haskell-modules/configuration-common.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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