From 277c62dc587846d6c571548f1d9cf03430713c10 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 23 May 2024 22:51:08 +0100 Subject: [PATCH] githooks.tests: fix eval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 44744fc83f3ce1034eaf0b6cbb245a88234a42fe) --- pkgs/by-name/gi/githooks/package.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gi/githooks/package.nix b/pkgs/by-name/gi/githooks/package.nix index f4e4cd02bd86..8a68c861471b 100644 --- a/pkgs/by-name/gi/githooks/package.nix +++ b/pkgs/by-name/gi/githooks/package.nix @@ -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; };