mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
stdenv: start deprecating non-list configureFlags
the motivation for this is to simplify stdenv and ease the job of reviewers due to them needing to tell contributors about the defacto rule that configureFlags should be a list of strings
This commit is contained in:
parent
be2ceab96f
commit
6d54fe622d
@ -331,8 +331,8 @@ else let
|
||||
|
||||
# This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
|
||||
configureFlags = let inherit (lib) optional elem; in
|
||||
(/**/ if lib.isString configureFlags then [configureFlags]
|
||||
else if configureFlags == null then []
|
||||
(/**/ if lib.isString configureFlags then lib.warn "String 'configureFlags' is deprecated and will be removed in release 23.05. Please use a list of strings. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" [configureFlags]
|
||||
else if configureFlags == null then lib.warn "Null 'configureFlags' is deprecated and will be removed in release 23.05. Please use a empty list instead '[]'. Derivation name: ${derivationArg.name}, file: ${pos.file or "unknown file"}" []
|
||||
else configureFlags)
|
||||
++ optional (elem "build" configurePlatforms) "--build=${stdenv.buildPlatform.config}"
|
||||
++ optional (elem "host" configurePlatforms) "--host=${stdenv.hostPlatform.config}"
|
||||
|
Loading…
Reference in New Issue
Block a user