summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-11 03:14:35 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-09-11 17:14:55 -0400
commitd7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb (patch)
tree3c1c03562e55d293f12101cd5c2493c6359ea57f /pkgs
parent9f9723b179961e7235d8e808c4ee8eaf52e05086 (diff)
downloadnixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar.gz
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar.bz2
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar.lz
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar.xz
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.tar.zst
nixlib-d7e3dbef6603b398c6b4b3c248b1b1d3bd8949fb.zip
glibc: Use lib.enableFeature and friends
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/libraries/glibc/common.nix13
1 files changed, 4 insertions, 9 deletions
diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix
index 1eecfa902790..424b212b39d3 100644
--- a/pkgs/development/libraries/glibc/common.nix
+++ b/pkgs/development/libraries/glibc/common.nix
@@ -110,18 +110,13 @@ stdenv.mkDerivation ({
       "--enable-obsolete-rpc"
       "--sysconfdir=/etc"
       "--enable-stackguard-randomization"
-      (if withLinuxHeaders
-       then "--with-headers=${linuxHeaders}/include"
-       else "--without-headers")
-      (if profilingLibraries
-       then "--enable-profile"
-       else "--disable-profile")
+      (lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
+      (lib.enableFeature profilingLibraries "profile")
     ] ++ lib.optionals withLinuxHeaders [
       "--enable-kernel=3.2.0" # can't get below with glibc >= 2.26
     ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
-      (if stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"
-       then "--without-fp"
-       else "--with-fp")
+      (lib.flip lib.withFeature "fp"
+         (stdenv.hostPlatform.platform.gcc.float or (stdenv.hostPlatform.parsed.abi.float or "hard") == "soft"))
       "--with-__thread"
     ] ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform && stdenv.hostPlatform.isAarch32) [
       "--host=arm-linux-gnueabi"