mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
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 New Issue
Block a user