mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
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" <package>` 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 `<package>` 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" <package>` to point to the file where
`<package>.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] 8227513ecf/nix_update/eval.nix (L99)