diff --git a/lib/customisation.nix b/lib/customisation.nix index 91a25055df29..b3c73c39be41 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -49,10 +49,6 @@ rec { else { })); - # usage: (you can use override multiple times) - # let d = makeOverridable stdenv.mkDerivation { name = ..; buildInputs; } - # noBuildInputs = d.override { buildInputs = []; } - # additionalBuildInputs = d.override ( args : args // { buildInputs = args.buildInputs ++ [ additional ]; } ) makeOverridable = f: origArgs: let ff = f origArgs; @@ -60,24 +56,16 @@ rec { in if builtins.isAttrs ff then (ff // { override = newArgs: makeOverridable f (overrideWith newArgs); - deepOverride = newArgs: - makeOverridable f (lib.overrideExisting (lib.mapAttrs (deepOverrider newArgs) origArgs) newArgs); overrideDerivation = fdrv: makeOverridable (args: overrideDerivation (f args) fdrv) origArgs; }) else if builtins.isFunction ff then { override = newArgs: makeOverridable f (overrideWith newArgs); __functor = self: ff; - deepOverride = throw "deepOverride not yet supported for functors"; overrideDerivation = throw "overrideDerivation not yet supported for functors"; } else ff; - deepOverrider = newArgs: name: x: if builtins.isAttrs x then ( - if x ? deepOverride then (x.deepOverride newArgs) else - if x ? override then (x.override newArgs) else - x) else x; - /* Call the package function in the file `fn' with the required arguments automatically. The function is called with the diff --git a/lib/deprecated.nix b/lib/deprecated.nix index 54c253f2c34b..3646f9e032a1 100644 --- a/lib/deprecated.nix +++ b/lib/deprecated.nix @@ -29,7 +29,6 @@ rec { } )); withStdOverrides = base // { override = base.passthru.function; - deepOverride = a : (base.passthru.function ((lib.mapAttrs (lib.deepOverrider a) base.passthru.args) // a)); } ; in withStdOverrides;