diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2020-11-11 16:00:11 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2020-11-11 16:00:11 +0100 |
commit | f70be9a3d1fec2cb0ac3ed94a04ecc85c389a4b3 (patch) | |
tree | 6831180646e03b7331ad1fc6d5b6cb3145ed92e3 /lib | |
parent | 379aaa1e0cb9ba38cf2071c049a7478adefb4827 (diff) | |
parent | 280e27327d4990245d418cd10a9d14cfd6df6f05 (diff) |
Merge master into staging-next
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strings.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index f62ff6679ef5..fbb48dec92af 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -561,7 +561,9 @@ rec { enableFeature false "shared" => "--disable-shared" */ - enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}"; + enableFeature = enable: feat: + assert isString feat; # e.g. passing openssl instead of "openssl" + "--${if enable then "enable" else "disable"}-${feat}"; /* Create an --{enable-<feat>=<value>,disable-<feat>} string that can be passed to standard GNU Autoconf scripts. @@ -583,7 +585,9 @@ rec { withFeature false "shared" => "--without-shared" */ - withFeature = with_: feat: "--${if with_ then "with" else "without"}-${feat}"; + withFeature = with_: feat: + assert isString feat; # e.g. passing openssl instead of "openssl" + "--${if with_ then "with" else "without"}-${feat}"; /* Create an --{with-<feat>=<value>,without-<feat>} string that can be passed to standard GNU Autoconf scripts. |