summary refs log tree commit diff
diff options
context:
space:
mode:
-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
4 files changed, 18 insertions, 7 deletions
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index b1036b80c4db..0729cc7ef293 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 5fc36c5b056a..f5562e28a09d 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 3f0335a0adf5..0fce5254dcb4 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 37a8c848c5d0..95759b93ae08 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -180,6 +180,9 @@ rec {
     androideabi = {};
     gnueabi = {};
     gnueabihf = {};
+    musleabi = {};
+    musleabihf = {};
+    musl = {};
 
     unknown = {};
   };