forked from mirrors/nixpkgs
pkgs/lib/strings.nix: add 'enableFeature' function to simplify generation of GNU Autoconf "--{enable,disable}-feature" strings
This commit is contained in:
parent
5f32207dfc
commit
7181888c23
|
@ -171,4 +171,9 @@ rec {
|
|||
assert ! eqStrings name filename;
|
||||
name;
|
||||
|
||||
|
||||
# Create an --{enable,disable}-<feat> string that can be passed to
|
||||
# standard GNU Autoconf scripts.
|
||||
enableFeature = enable: feat: "--${if enable then "enable" else "disable"}-${feat}";
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue