githooks.tests: fix eval

Without the change the eval fails as:

    $ nix build --no-link -f. githooks.tests
    error:
           … while evaluating the 'name' attribute of a derivation

           … while evaluating a branch condition
             at lib/strings.nix:1194:3:
             1193|   # First detect the common case of already valid strings, to speed those up
             1194|   if stringLength string <= 207 && okRegex string != null
                 |   ^
             1195|   then unsafeDiscardStringContext string

           … in the left operand of the AND (&&) operator
             at lib/strings.nix:1194:33:
             1193|   # First detect the common case of already valid strings, to speed those up
             1194|   if stringLength string <= 207 && okRegex string != null
                 |                                 ^
             1195|   then unsafeDiscardStringContext string

           (stack trace truncated; use '--show-trace' to show the full, detailed trace)

           error: expected a set but found a string: "githooks-cli"

(cherry picked from commit 44744fc83f)
This commit is contained in:
Sergei Trofimovich 2024-05-23 22:51:08 +01:00 committed by github-actions[bot]
parent c39b5a177c
commit 277c62dc58

View File

@ -5,6 +5,7 @@
git,
testers,
makeWrapper,
githooks
}:
buildGoModule rec {
pname = "githooks";
@ -70,7 +71,7 @@ buildGoModule rec {
'';
passthru.tests.version = testers.testVersion {
package = "githooks-cli";
package = githooks;
command = "githooks-cli --version";
inherit version;
};