diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-09-08 00:46:04 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-09-16 22:13:21 +0000 |
commit | afcf2d55332c5c01c2d989e9d010577d257cb6cc (patch) | |
tree | e1c816a271686b014a6403bcad7c57dd2ee4d9c7 /nixpkgs/lib | |
parent | 175b9acd282aaf65b5f354ea6e95c1348fe3daa3 (diff) | |
parent | 4e60699fa727e4a0f9a3e78948012f86da32cfef (diff) | |
download | nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.gz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.bz2 nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.lz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.xz nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.zst nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.zip |
Merge commit '4e60699fa727e4a0f9a3e78948012f86da32cfef'
Diffstat (limited to 'nixpkgs/lib')
-rw-r--r-- | nixpkgs/lib/systems/examples.nix | 5 | ||||
-rw-r--r-- | nixpkgs/lib/systems/inspect.nix | 4 | ||||
-rw-r--r-- | nixpkgs/lib/systems/parse.nix | 7 | ||||
-rw-r--r-- | nixpkgs/lib/types.nix | 3 |
4 files changed, 16 insertions, 3 deletions
diff --git a/nixpkgs/lib/systems/examples.nix b/nixpkgs/lib/systems/examples.nix index aa55438de082..4861fe634a02 100644 --- a/nixpkgs/lib/systems/examples.nix +++ b/nixpkgs/lib/systems/examples.nix @@ -236,4 +236,9 @@ rec { useLLVM = true; }; + # Ghcjs + ghcjs = { + config = "js-unknown-ghcjs"; + platform = {}; + }; } diff --git a/nixpkgs/lib/systems/inspect.nix b/nixpkgs/lib/systems/inspect.nix index 9a12e3c3926d..8a983b3d3637 100644 --- a/nixpkgs/lib/systems/inspect.nix +++ b/nixpkgs/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/nixpkgs/lib/systems/parse.nix b/nixpkgs/lib/systems/parse.nix index b088cd342f12..0c42689a9b13 100644 --- a/nixpkgs/lib/systems/parse.nix +++ b/nixpkgs/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/nixpkgs/lib/types.nix b/nixpkgs/lib/types.nix index 9c00656ab918..bcb5de0c379b 100644 --- a/nixpkgs/lib/types.nix +++ b/nixpkgs/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"; |