diff --git a/pkgs/by-name/li/libcollectdclient/package.nix b/pkgs/by-name/li/libcollectdclient/package.nix index ae8b2dc671fc..b9247629c574 100644 --- a/pkgs/by-name/li/libcollectdclient/package.nix +++ b/pkgs/by-name/li/libcollectdclient/package.nix @@ -2,7 +2,6 @@ collectd.overrideAttrs (oldAttrs: { pname = "libcollectdclient"; - inherit (collectd) version; buildInputs = [ ]; configureFlags = (oldAttrs.configureFlags or [ ]) ++ [ diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 00ce52edd947..49f0ff040a41 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -439,6 +439,7 @@ assert bootstrapTools.passthru.isFromBootstrapFiles or false; # sanity check (superDarwin.binutils-unwrapped.override { enableManpages = false; }).overrideAttrs (old: { version = "boot"; + __intentionallyOverridingVersion = true; # to avoid a warning suggesting to provide src passthru = (old.passthru or { }) // { isFromBootstrapFiles = true; }; diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 499602a94448..7bd3301169c9 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -36,6 +36,7 @@ let remove splitString subtractLists + toFunction unique zipAttrsWith ; @@ -61,12 +62,7 @@ let Most arguments are also passed through to the underlying call of [`builtins.derivation`](https://nixos.org/manual/nix/stable/language/derivations). ::: */ - mkDerivation = - fnOrAttrs: - if builtins.isFunction fnOrAttrs then - makeDerivationExtensible fnOrAttrs - else - makeDerivationExtensibleConst fnOrAttrs; + mkDerivation = fnOrAttrs: makeDerivationExtensible (toFunction fnOrAttrs); checkMeta = import ./check-meta.nix { inherit lib config; @@ -99,6 +95,10 @@ let thisOverlay = overlay final prev; warnForBadVersionOverride = ( thisOverlay ? version + && prev ? version + # We could check that the version is actually distinct, but that + # would probably just delay the inevitable, or preserve tech debt. + # && prev.version != thisOverlay.version && !(thisOverlay ? src) && !(thisOverlay.__intentionallyOverridingVersion or false) ); @@ -135,25 +135,6 @@ let in finalPackage; - #makeDerivationExtensibleConst = attrs: makeDerivationExtensible (_: attrs); - # but pre-evaluated for a slight improvement in performance. - makeDerivationExtensibleConst = - attrs: - mkDerivationSimple ( - f0: - let - f = - self: super: - let - x = f0 super; - in - if builtins.isFunction x then f0 self super else x; - in - makeDerivationExtensible ( - self: attrs // (if builtins.isFunction f0 || f0 ? __functor then f self attrs else f0) - ) - ) attrs; - knownHardeningFlags = [ "bindnow" "format" diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 65191596e7f9..c6d576b89c01 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15911,6 +15911,7 @@ with pkgs; polyml = polyml.overrideAttrs { pname = "polyml-for-isabelle"; version = "2025"; + __intentionallyOverridingVersion = true; # avoid a warning, no src override configureFlags = [ "--enable-intinf-as-int" "--with-gmp"