pkgs/make-derivation.nix: Refactor, inline makeOverlayable
This commit is contained in:
parent
1b00adbad1
commit
7e3c80f5b7
1 changed files with 4 additions and 7 deletions
|
@ -10,12 +10,6 @@ let
|
|||
inherit (stdenv) hostPlatform;
|
||||
};
|
||||
|
||||
makeOverlayable = mkDerivationSimple:
|
||||
fnOrAttrs:
|
||||
if builtins.isFunction fnOrAttrs
|
||||
then makeDerivationExtensible mkDerivationSimple fnOrAttrs
|
||||
else makeDerivationExtensibleConst mkDerivationSimple fnOrAttrs;
|
||||
|
||||
# Based off lib.makeExtensible, with modifications:
|
||||
makeDerivationExtensible = mkDerivationSimple: rattrs:
|
||||
let
|
||||
|
@ -486,4 +480,7 @@ lib.extendDerivation
|
|||
(derivation derivationArg);
|
||||
|
||||
in
|
||||
makeOverlayable mkDerivationSimple
|
||||
fnOrAttrs:
|
||||
if builtins.isFunction fnOrAttrs
|
||||
then makeDerivationExtensible mkDerivationSimple fnOrAttrs
|
||||
else makeDerivationExtensibleConst mkDerivationSimple fnOrAttrs
|
||||
|
|
Loading…
Reference in a new issue