diff options
author | Vladimír Čunát <v@cunat.cz> | 2019-09-02 23:25:24 +0200 |
---|---|---|
committer | Vladimír Čunát <v@cunat.cz> | 2019-09-02 23:25:24 +0200 |
commit | f21211ebfe21797c6f0444d42ec7cb835c737388 (patch) | |
tree | 816465981f650242d4b22e0f01b912917e7008f8 /lib | |
parent | b291f2a9953d48d6edc5c73776db9ba289ccf213 (diff) | |
parent | 12ae04518b004adf949a43125954b99c05189e6f (diff) | |
download | nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar.gz nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar.bz2 nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar.lz nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar.xz nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.tar.zst nixlib-f21211ebfe21797c6f0444d42ec7cb835c737388.zip |
Merge branch 'master' into staging
Diffstat (limited to 'lib')
-rw-r--r-- | lib/customisation.nix | 2 | ||||
-rw-r--r-- | lib/systems/examples.nix | 5 | ||||
-rw-r--r-- | lib/systems/inspect.nix | 4 | ||||
-rw-r--r-- | lib/systems/parse.nix | 7 | ||||
-rw-r--r-- | lib/types.nix | 3 |
5 files changed, 17 insertions, 4 deletions
diff --git a/lib/customisation.nix b/lib/customisation.nix index 1f5eb0d11e8b..3be36fcd719b 100644 --- a/lib/customisation.nix +++ b/lib/customisation.nix @@ -47,7 +47,7 @@ rec { /* `makeOverridable` takes a function from attribute set to attribute set and - injects `override` attibute which can be used to override arguments of + injects `override` attribute which can be used to override arguments of the function. nix-repl> x = {a, b}: { result = a + b; } diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix index 8fb1a342177e..511ae1979485 100644 --- a/lib/systems/examples.nix +++ b/lib/systems/examples.nix @@ -236,4 +236,9 @@ rec { useLLVM = true; }; + # Ghcjs + ghcjs = { + config = "js-unknown-ghcjs"; + platform = {}; + }; } diff --git a/lib/systems/inspect.nix b/lib/systems/inspect.nix index 9a12e3c3926d..8a983b3d3637 100644 --- a/lib/systems/inspect.nix +++ b/lib/systems/inspect.nix @@ -12,7 +12,7 @@ rec { isx86_32 = { cpu = { family = "x86"; bits = 32; }; }; isx86_64 = { cpu = { family = "x86"; bits = 64; }; }; isPowerPC = { cpu = cpuTypes.powerpc; }; - isPower = { cpu = { family = "power"; }; }; + isPower = { cpu = { family = "power"; }; }; isx86 = { cpu = { family = "x86"; }; }; isAarch32 = { cpu = { family = "arm"; bits = 32; }; }; isAarch64 = { cpu = { family = "arm"; bits = 64; }; }; @@ -23,6 +23,7 @@ rec { isMsp430 = { cpu = { family = "msp430"; }; }; isAvr = { cpu = { family = "avr"; }; }; isAlpha = { cpu = { family = "alpha"; }; }; + isJavaScript = { cpu = cpuTypes.js; }; is32bit = { cpu = { bits = 32; }; }; is64bit = { cpu = { bits = 64; }; }; @@ -44,6 +45,7 @@ rec { isCygwin = { kernel = kernels.windows; abi = abis.cygnus; }; isMinGW = { kernel = kernels.windows; abi = abis.gnu; }; isWasi = { kernel = kernels.wasi; }; + isGhcjs = { kernel = kernels.ghcjs; }; isNone = { kernel = kernels.none; }; isAndroid = [ { abi = abis.android; } { abi = abis.androideabi; } ]; diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 1339f50f0572..5e12df32ffdd 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -106,11 +106,13 @@ rec { wasm32 = { bits = 32; significantByte = littleEndian; family = "wasm"; }; wasm64 = { bits = 64; significantByte = littleEndian; family = "wasm"; }; - + alpha = { bits = 64; significantByte = littleEndian; family = "alpha"; }; msp430 = { bits = 16; significantByte = littleEndian; family = "msp430"; }; avr = { bits = 8; family = "avr"; }; + + js = { bits = 32; significantByte = littleEndian; family = "js"; }; }; # Determine where two CPUs are compatible with each other. That is, @@ -271,6 +273,7 @@ rec { solaris = { execFormat = elf; families = { }; }; wasi = { execFormat = wasm; families = { }; }; windows = { execFormat = pe; families = { }; }; + ghcjs = { execFormat = unknown; families = { }; }; } // { # aliases # 'darwin' is the kernel for all of them. We choose macOS by default. darwin = kernels.macos; @@ -384,6 +387,8 @@ rec { then { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; } else if (elem (elemAt l 2) ["eabi" "eabihf" "elf"]) then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 1; abi = elemAt l 2; } + else if (elemAt l 2 == "ghcjs") + then { cpu = elemAt l 0; vendor = "unknown"; kernel = elemAt l 2; } else throw "Target specification with 3 components is ambiguous"; "4" = { cpu = elemAt l 0; vendor = elemAt l 1; kernel = elemAt l 2; abi = elemAt l 3; }; }.${toString (length l)} diff --git a/lib/types.nix b/lib/types.nix index d3526375b1ca..5e9a28ac4f0a 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -217,7 +217,8 @@ rec { # Deprecated; should not be used because it quietly concatenates # strings, which is usually not what you want. - string = separatedString ""; + string = warn "types.string is deprecated because it quietly concatenates strings" + (separatedString ""); attrs = mkOptionType { name = "attrs"; |