From 6d54fe622d9fb31c7c08c832522bf46ffb79ea27 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sun, 15 May 2022 19:25:41 +0300 Subject: [PATCH] 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 --- pkgs/stdenv/generic/make-derivation.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/stdenv/generic/make-derivation.nix b/pkgs/stdenv/generic/make-derivation.nix index cfed6d197cf0..ed457019c558 100644 --- a/pkgs/stdenv/generic/make-derivation.nix +++ b/pkgs/stdenv/generic/make-derivation.nix @@ -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}"