From 12794ae7a2de45156b5f27edb7d4224158e13362 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Tue, 17 Feb 2026 19:02:28 +0100 Subject: [PATCH] goredo: move env variable into env, fix antipattern Moving the env variable for future-proofing for __structuredAttrs = true. When cross compiling, if doCheck = true; in mkDerivation's arguments, then finalAttrs.doCheck will also be true, but doCheck will be passed to the builder as false, and the actual, resultant attrset returned by mkDerivation will also have doCheck set to false. --- pkgs/by-name/go/goredo/package.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/go/goredo/package.nix b/pkgs/by-name/go/goredo/package.nix index 81f5eb303931..cd4bdde31003 100644 --- a/pkgs/by-name/go/goredo/package.nix +++ b/pkgs/by-name/go/goredo/package.nix @@ -24,12 +24,14 @@ buildGoModule (finalAttrs: { nativeBuildInputs = [ zstd ]; - nativeCheckInputs = lib.optionals finalAttrs.doCheck [ + nativeCheckInputs = lib.optionals finalAttrs.finalPackage.doCheck [ python3 perl ]; - inherit (sharness) SHARNESS_TEST_SRCDIR; + env = { + inherit (sharness) SHARNESS_TEST_SRCDIR; + }; vendorHash = null;