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
1 changed files with 5 additions and 0 deletions
|
@ -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