pkgs/make-derivation.nix: Refactor, inline makeOverlayable

This commit is contained in:
Robert Hensing 2022-06-05 13:35:04 +02:00
parent 1b00adbad1
commit 7e3c80f5b7

View file

@ -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