diff options
Diffstat (limited to 'lib/strings.nix')
-rw-r--r-- | lib/strings.nix | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/strings.nix b/lib/strings.nix index fbb48dec92af..5010d9159cb8 100644 --- a/lib/strings.nix +++ b/lib/strings.nix @@ -569,9 +569,9 @@ rec { standard GNU Autoconf scripts. Example: - enableFeature true "shared" "foo" + enableFeatureAs true "shared" "foo" => "--enable-shared=foo" - enableFeature false "shared" (throw "ignored") + enableFeatureAs false "shared" (throw "ignored") => "--disable-shared" */ enableFeatureAs = enable: feat: value: enableFeature enable feat + optionalString enable "=${value}"; @@ -593,9 +593,9 @@ rec { standard GNU Autoconf scripts. Example: - with_Feature true "shared" "foo" + withFeatureAs true "shared" "foo" => "--with-shared=foo" - with_Feature false "shared" (throw "ignored") + withFeatureAs false "shared" (throw "ignored") => "--without-shared" */ withFeatureAs = with_: feat: value: withFeature with_ feat + optionalString with_ "=${value}"; @@ -674,7 +674,7 @@ rec { else false; - /* Parse a string string as an int. + /* Parse a string as an int. Type: string -> int |