git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #46544 from obsidiansystems/glibc-configureFlags-cleanup

glibc: Use lib.enableFeature and friends

commit67a1f508ff64fe57ac0797b72675584e2b2aadc9 authorJohn Ericson <subscribe@JohnEricson.me> dateTue 11 Sep 2018, 17:50 (8 years ago) parent8955ec6d7e3dbe
1 file changed+4−9
pkgs/development/libraries/glibc/common.nix+4−9
pkgs/development/libraries/glibc/common.nix+4−9
@@ -110,18 +110,13 @@ stdenv.mkDerivation ({
110110 "--enable-obsolete-rpc"
111111 "--sysconfdir=/etc"
112112 "--enable-stackguard-randomization"
113− (if withLinuxHeaders
114− then "--with-headers=${linuxHeaders}/include"
115− else "--without-headers")
116− (if profilingLibraries
117− then "--enable-profile"
118− else "--disable-profile")
113+ (lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
114+ (lib.enableFeature profilingLibraries "profile")
119115 ] ++ lib.optionals withLinuxHeaders [
120116 "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
121117 ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
122− (if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"
123− then "--without-fp"
124− else "--with-fp")
118+ (lib.flip lib.withFeature "fp"
119+ (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"))
125120 "--with-__thread"
126121 ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
127122 "--host=arm-linux-gnueabi"