diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index e72d8eee657a..348dfbfd9f36 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -410,6 +410,8 @@ gnuradioMinimal.override { - `fetchFromSavannah` is now deprecated and is expected to be fully removed in a future release. From now on, use `fetchgit` or a Savannah releases mirror when applicable. +- Using nested lists in build/runtime inputs in `mkDerivation` is now deprecated. + ### Additions and Improvements {#sec-nixpkgs-release-26.05-lib-additions-improvements} - The builder `php.buildComposerProject2` for PHP applications has been improved for better reliability and stability. diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index 7df90e856846..e1680f07cfa4 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -52,6 +52,7 @@ let unique unsafeDiscardStringContext unsafeGetAttrPos + warn warnIf zipAttrsWith ; @@ -482,7 +483,12 @@ let if isSingularDependency dep then index + 1 else if isList dep then - seq (checkDependencyList' ([ index ] ++ positions) name dep) (index + 1) + warn + '' + Dependency of package '${attrs.name or attrs.pname}' uses a nested list in attribute '${name}'. + This is deprecated as of Nixpkgs release 26.05, and support will + be removed in a future nixpkgs release.'' + (seq (checkDependencyList' ([ index ] ++ positions) name dep) (index + 1)) else throw "Dependency is not of a valid type: ${ concatMapStrings (ix: "element ${toString ix} of ") ([ index ] ++ positions)