git.iko.soy/typeable/nixpkgs
on master help sign in
glibc: Use lib.enableFeature and friends
commitd7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb authorJohn Ericson <John.Ericson@Obsidian.Systems> dateTue 11 Sep 2018, 03:14 (8 years ago) parent9f9723b
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"