about summary refs log tree commit diff
path: root/pkgs/build-support/setup-hooks/postgresql-test-hook
diff options
context:
space:
mode:
authorShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2022-08-12 16:29:37 +0800
committerShamrock Lee <44064051+ShamrockLee@users.noreply.github.com>2022-08-13 04:20:12 +0800
commitba895a7da8f86c6f924fc96026d8f1cb1ea2af1e (patch)
tree7b52f68ddd1df0ea7a6e583337a4b845e834efd9 /pkgs/build-support/setup-hooks/postgresql-test-hook
parentc4a0efdd5a728e20791b8d8d2f26f90ac228ee8d (diff)
trivial-builders.nix: Add input argument `passthru` to makeSetupHook
One significant use case is adding `passthru.tests` to setup-hooks,
and help increase test coverage for mission-critical setup-hooks.

As `meta`, `passthru` doesn't go into the build script directly.
However, passing an empty set to `passthru` breaks nixpkgs-review
and OfBorg tests, so pass it only when specified.
Diffstat (limited to 'pkgs/build-support/setup-hooks/postgresql-test-hook')
-rw-r--r--pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix b/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
index d0031c93c10cb..e9e77b0bbe6f8 100644
--- a/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
+++ b/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
@@ -1,9 +1,8 @@
 { callPackage, makeSetupHook }:
 
-(makeSetupHook {
+makeSetupHook {
   name = "postgresql-test-hook";
-} ./postgresql-test-hook.sh).overrideAttrs (o: {
   passthru.tests = {
     simple = callPackage ./test.nix { };
   };
-})
+} ./postgresql-test-hook.sh