Commit 44744fc8 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

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"
parent 72b813ec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
  };