From 2f2b2bf49967ceb5701a5959ef80a032f2c6f49d Mon Sep 17 00:00:00 2001 From: Tom Hunze Date: Mon, 19 Jan 2026 00:15:38 +0100 Subject: [PATCH] buildPerlPackage: remove explicit `src` argument This goal of this change is to make nix-update-script work out of the box with packages built using `buildPerlPackage`. Explicitly setting `src` in the `stdenv.mkDerivation` call currently causes `builtins.unsafeGetAttrPos "src" ` to point to `pkgs/development/perl-modules/generic/default.nix` for packages built using `buildPerlPackage`. If the result of this expression is not `null`, nix-update will try to update `src` of `` in this file [1], which will fail for obvious reasons. A good example of this happening is with the pgformatter package. Removing the explicit `inherit src` allows `builtins.unsafeGetAttrPos "src" ` to point to the file where `.src` is actually defined, fixing nix-update runs for affected packages. Git history doesn't provide any indication as to why this argument was introduced in the first place, so I hope it's fine to remove it. The only difference in evaluation will be for calls to `buildPerlPackage` without `src`: In these cases, `src` will be unset instead of `null`. [1] https://github.com/Mic92/nix-update/blob/8227513ecf2f9ca657951fac3a6935410107eb90/nix_update/eval.nix#L99 --- pkgs/development/perl-modules/generic/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/perl-modules/generic/default.nix b/pkgs/development/perl-modules/generic/default.nix index 566129a5f00c..03dae50f7e99 100644 --- a/pkgs/development/perl-modules/generic/default.nix +++ b/pkgs/development/perl-modules/generic/default.nix @@ -12,7 +12,6 @@ "out" "devdoc" ], - src ? null, # enabling or disabling does nothing for perl packages so set it explicitly # to false to not change hashes when enableParallelBuildingByDefault is enabled @@ -64,7 +63,6 @@ lib.throwIf (attrs ? name) inherit outputs - src doCheck checkTarget enableParallelBuilding