summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2019-04-02 20:56:53 +0200
committerVladimír Čunát <v@cunat.cz>2019-04-02 20:56:53 +0200
commit2771375d6e62d2ffdf4ee469a8a96f245afe321e (patch)
treea1488d45be0e5ce7591cee874a75341230bfa80c /lib
parentba18b47c2a89f3bf5a5b34a4c514b0bf2f598a39 (diff)
parentef5fd41a1183a7bb23fdfac82203277e5d85ea8f (diff)
Merge branch 'master' into staging-next
Hydra nixpkgs: ?compare=1512490
Diffstat (limited to 'lib')
-rw-r--r--lib/lists.nix2
-rw-r--r--lib/systems/default.nix1
-rw-r--r--lib/systems/examples.nix5
-rw-r--r--lib/systems/inspect.nix1
-rw-r--r--lib/systems/parse.nix1
5 files changed, 9 insertions, 1 deletions
diff --git a/lib/lists.nix b/lib/lists.nix
index be541427c247..9f2ccc00cafe 100644
--- a/lib/lists.nix
+++ b/lib/lists.nix
@@ -7,7 +7,7 @@ let
in
rec {
- inherit (builtins) head tail length isList elemAt concatLists filter elem genList;
+ inherit (builtins) head tail length isList elemAt concatLists filter elem genList map;
/* Create a list consisting of a single element. `singleton x` is
sometimes more convenient with respect to indentation than `[x]`
diff --git a/lib/systems/default.nix b/lib/systems/default.nix
index 090a3f700d4c..52b9bd46e600 100644
--- a/lib/systems/default.nix
+++ b/lib/systems/default.nix
@@ -34,6 +34,7 @@ rec {
else if final.isUClibc then "uclibc"
else if final.isAndroid then "bionic"
else if final.isLinux /* default */ then "glibc"
+ else if final.isMsp430 then "newlib"
else if final.isAvr then "avrlibc"
else if final.isNetBSD then "nblibc"
# TODO(@Ericson2314) think more about other operating systems
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index 0c9a3b4a63f5..28a8d3cb9eb9 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -102,6 +102,11 @@ rec {
riscv64 = riscv "64";
riscv32 = riscv "32";
+ msp430 = {
+ config = "msp430-elf";
+ libc = "newlib";
+ };
+
avr = {
config = "avr";
};
diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix
index 932f8fd1e536..f8d5ca84d7aa 100644
--- a/lib/systems/inspect.nix
+++ b/lib/systems/inspect.nix
@@ -20,6 +20,7 @@ rec {
isRiscV = { cpu = { family = "riscv"; }; };
isSparc = { cpu = { family = "sparc"; }; };
isWasm = { cpu = { family = "wasm"; }; };
+ isMsp430 = { cpu = { family = "msp430"; }; };
isAvr = { cpu = { family = "avr"; }; };
isAlpha = { cpu = { family = "alpha"; }; };
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index fab50bc0ebd7..8cc7d3ae271f 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -109,6 +109,7 @@ rec {
alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; };
+ msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; };
avr = { bits = 8; family = "avr"; };
};