summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2018-02-16 09:13:12 +0100
committerVladimír Čunát <vcunat@gmail.com>2018-02-16 09:13:12 +0100
commitb5aaaf87a7741f1c20672c584ca08a01fa1a1129 (patch)
tree8cd4b2948285c21ad71abb1258dd5d41f17fdc01 /lib
parent90252481bfe233c3fe5a54f9d6d73e93f08e1e27 (diff)
parent2b851d14d9f7fa09120a407fecf3a81cea12bebe (diff)
downloadnixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar.gz
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar.bz2
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar.lz
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar.xz
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.tar.zst
nixpkgs-b5aaaf87a7741f1c20672c584ca08a01fa1a1129.zip
Merge staging and PR #35021
It's the last staging commit (mostly) built on Hydra,
and a minimal fix for Darwin regression in pysqlite.
Diffstat (limited to 'lib')
-rw-r--r--lib/systems/default.nix3
-rw-r--r--lib/systems/examples.nix17
-rw-r--r--lib/systems/inspect.nix2
-rw-r--r--lib/systems/parse.nix3
-rw-r--r--lib/systems/platforms.nix9
5 files changed, 18 insertions, 16 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index b1036b80c4d..0729cc7ef29 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -26,7 +26,8 @@ rec {
       libc =
         /**/ if final.isDarwin then "libSystem"
         else if final.isMinGW  then "msvcrt"
-        else if final.isLinux  then "glibc"
+        else if final.isMusl  then "musl"
+        else if final.isLinux /* default */    then "glibc"
         # TODO(@Ericson2314) think more about other operating systems
         else                        "native/impure";
       extensions = {
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 5fc36c5b056..f5562e28a09 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -13,7 +13,6 @@ rec {
     config = "armv5tel-unknown-linux-gnueabi";
     arch = "armv5tel";
     float = "soft";
-    libc = "glibc";
     platform = platforms.sheevaplug;
   };
 
@@ -22,7 +21,6 @@ rec {
     arch = "armv6l";
     float = "hard";
     fpu = "vfp";
-    libc = "glibc";
     platform = platforms.raspberrypi;
   };
 
@@ -31,14 +29,12 @@ rec {
     arch = "armv7-a";
     float = "hard";
     fpu = "vfpv3-d16";
-    libc = "glibc";
     platform = platforms.armv7l-hf-multiplatform;
   };
 
   aarch64-multiplatform = rec {
     config = "aarch64-unknown-linux-gnu";
     arch = "aarch64";
-    libc = "glibc";
     platform = platforms.aarch64-multiplatform;
   };
 
@@ -51,7 +47,6 @@ rec {
     arch = "armv5tel";
     config = "armv5tel-unknown-linux-gnueabi";
     float = "soft";
-    libc = "glibc";
     platform = platforms.pogoplug4;
   };
 
@@ -59,10 +54,20 @@ rec {
     config = "mips64el-unknown-linux-gnu";
     arch = "mips";
     float = "hard";
-    libc = "glibc";
     platform = platforms.fuloong2f_n32;
   };
 
+  muslpi = raspberryPi // {
+    config = "armv6l-unknown-linux-musleabihf";
+  };
+
+  aarch64-multiplatform-musl = aarch64-multiplatform // {
+    config = "aarch64-unknown-linux-musl";
+  };
+
+  musl64 = { config = "x86_64-unknown-linux-musl"; };
+  musl32  = { config = "i686-unknown-linux-musl"; };
+
   #
   # Darwin
   #
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index 3f0335a0adf..0fce5254dcb 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -33,6 +33,8 @@ rec {
     Windows      = { kernel = kernels.windows; };
     Cygwin       = { kernel = kernels.windows; abi = abis.cygnus; };
     MinGW        = { kernel = kernels.windows; abi = abis.gnu; };
+
+    Musl         = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];
   };
 
   matchAnyAttrs = patterns:
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index 37a8c848c5d..95759b93ae0 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -180,6 +180,9 @@ rec {
     androideabi = {};
     gnueabi = {};
     gnueabihf = {};
+    musleabi = {};
+    musleabihf = {};
+    musl = {};
 
     unknown = {};
   };
diff --git a/lib/systems/platforms.nix b/lib/systems/platforms.nix
index 282fb0994b5..58a7afa7679 100644
--- a/lib/systems/platforms.nix
+++ b/lib/systems/platforms.nix
@@ -2,7 +2,6 @@
 rec {
   pcBase = {
     name = "pc";
-    kernelHeadersBaseConfig = "defconfig";
     kernelBaseConfig = "defconfig";
     # Build whatever possible as a module, if not stated in the extra config.
     kernelAutoModules = true;
@@ -30,7 +29,6 @@ rec {
     };
 
     kernelMajor = "2.6";
-    kernelHeadersBaseConfig = "multi_v5_defconfig";
     kernelBaseConfig = "multi_v5_defconfig";
     kernelArch = "arm";
     kernelAutoModules = false;
@@ -54,7 +52,6 @@ rec {
   sheevaplug = {
     name = "sheevaplug";
     kernelMajor = "2.6";
-    kernelHeadersBaseConfig = "multi_v5_defconfig";
     kernelBaseConfig = "multi_v5_defconfig";
     kernelArch = "arm";
     kernelAutoModules = false;
@@ -168,7 +165,6 @@ rec {
   raspberrypi = {
     name = "raspberrypi";
     kernelMajor = "2.6";
-    kernelHeadersBaseConfig = "bcm2835_defconfig";
     kernelBaseConfig = "bcmrpi_defconfig";
     kernelDTB = true;
     kernelArch = "arm";
@@ -347,7 +343,6 @@ rec {
   utilite = {
     name = "utilite";
     kernelMajor = "2.6";
-    kernelHeadersBaseConfig = "multi_v7_defconfig";
     kernelBaseConfig = "multi_v7_defconfig";
     kernelArch = "arm";
     kernelAutoModules = false;
@@ -379,13 +374,11 @@ rec {
     # patch.
 
     kernelBaseConfig = "guruplug_defconfig";
-    #kernelHeadersBaseConfig = "guruplug_defconfig";
   };
 
   fuloong2f_n32 = {
     name = "fuloong2f_n32";
     kernelMajor = "2.6";
-    kernelHeadersBaseConfig = "fuloong2e_defconfig";
     kernelBaseConfig = "lemote2f_defconfig";
     kernelArch = "mips";
     kernelAutoModules = false;
@@ -471,7 +464,6 @@ rec {
   armv7l-hf-multiplatform = {
     name = "armv7l-hf-multiplatform";
     kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
-    kernelHeadersBaseConfig = "multi_v7_defconfig";
     kernelBaseConfig = "multi_v7_defconfig";
     kernelArch = "arm";
     kernelDTB = true;
@@ -517,7 +509,6 @@ rec {
   aarch64-multiplatform = {
     name = "aarch64-multiplatform";
     kernelMajor = "2.6"; # Using "2.6" enables 2.6 kernel syscalls in glibc.
-    kernelHeadersBaseConfig = "defconfig";
     kernelBaseConfig = "defconfig";
     kernelArch = "arm64";
     kernelDTB = true;