mkDerivation: Un-inline makeDerivationExtensible from makeDerivationExtensibleConst
Considering the code was out of sync, this adds the `version`/`src` warning to non-"finalAttrs" calls to `mkDerivation`. That didn't work. (I un-DRY-ed this as a micro-optimization at some point, and I apologize... while simultaneously blaming contributors who change the file without understanding it, therefore implicating myself *yet again* and making myself a hypocrite)
This commit is contained in:
@@ -136,24 +136,7 @@ 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;
|
||||
makeDerivationExtensibleConst = attrs: makeDerivationExtensible (_: attrs);
|
||||
|
||||
knownHardeningFlags = [
|
||||
"bindnow"
|
||||
|
||||
Reference in New Issue
Block a user