From a52e317200eca8ef7b8c6d6b77336a6a9f397a0e Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Sat, 27 Apr 2019 20:37:42 -0400 Subject: check-meta: use system tuple in platforms Fixes #60345 --- lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/default.nix b/lib/default.nix index 8735b6476795..3efaaf0f8f9e 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -50,7 +50,7 @@ let filesystem = callLibs ./filesystem.nix; # back-compat aliases - platforms = systems.forMeta; + platforms = systems.doubles; inherit (builtins) add addErrorContext attrNames concatLists deepSeq elem elemAt filter genericClosure genList getAttr -- cgit v1.2.3 From e500bb84090ddca3e213f4d6ced1f1647be486d6 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 30 Apr 2019 11:50:45 -0400 Subject: systems: add riscv double This was never listed in doubles.nix! Not sure why? --- lib/systems/doubles.nix | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix index c6877ebef0bc..ff071c182d4f 100644 --- a/lib/systems/doubles.nix +++ b/lib/systems/doubles.nix @@ -19,6 +19,8 @@ let "x86_64-windows" "i686-windows" "wasm64-wasi" "wasm32-wasi" + + "riscv32-linux" "riscv64-linux" ]; allParsed = map parse.mkSystemFromString all; @@ -36,6 +38,7 @@ in rec { i686 = filterDoubles predicates.isi686; x86_64 = filterDoubles predicates.isx86_64; mips = filterDoubles predicates.isMips; + riscv = filterDoubles predicates.isRiscV; cygwin = filterDoubles predicates.isCygwin; darwin = filterDoubles predicates.isDarwin; -- cgit v1.2.3 From 40271ae1382b14673b7b3f9edb6c1f9bba1bbe47 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 4 Jun 2019 11:09:43 -0400 Subject: systems: remove forMeta This is unused now. --- lib/systems/default.nix | 1 - lib/systems/for-meta.nix | 38 -------------------------------------- 2 files changed, 39 deletions(-) delete mode 100644 lib/systems/for-meta.nix (limited to 'lib') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 5e6d277be7d5..ea18904cc635 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -3,7 +3,6 @@ rec { doubles = import ./doubles.nix { inherit lib; }; - forMeta = import ./for-meta.nix { inherit lib; }; parse = import ./parse.nix { inherit lib; }; inspect = import ./inspect.nix { inherit lib; }; platforms = import ./platforms.nix { inherit lib; }; diff --git a/lib/systems/for-meta.nix b/lib/systems/for-meta.nix deleted file mode 100644 index 17ae94deb7d1..000000000000 --- a/lib/systems/for-meta.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ lib }: -let - inherit (lib.systems) parse; - inherit (lib.systems.inspect) patterns; - - abis = lib.mapAttrs (_: abi: builtins.removeAttrs abi [ "assertions" ]) parse.abis; - -in rec { - all = [ {} ]; # `{}` matches anything - none = []; - - arm = [ patterns.isAarch32 ]; - aarch64 = [ patterns.isAarch64 ]; - x86 = [ patterns.isx86 ]; - i686 = [ patterns.isi686 ]; - x86_64 = [ patterns.isx86_64 ]; - mips = [ patterns.isMips ]; - riscv = [ patterns.isRiscV ]; - - cygwin = [ patterns.isCygwin ]; - darwin = [ patterns.isDarwin ]; - freebsd = [ patterns.isFreeBSD ]; - # Should be better, but MinGW is unclear. - gnu = [ - { kernel = parse.kernels.linux; abi = abis.gnu; } - { kernel = parse.kernels.linux; abi = abis.gnueabi; } - { kernel = parse.kernels.linux; abi = abis.gnueabihf; } - ]; - illumos = [ patterns.isSunOS ]; - linux = [ patterns.isLinux ]; - netbsd = [ patterns.isNetBSD ]; - openbsd = [ patterns.isOpenBSD ]; - unix = patterns.isUnix; # Actually a list - windows = [ patterns.isWindows ]; - wasi = [ patterns.isWasi ]; - - inherit (lib.systems.doubles) mesaPlatforms; -} -- cgit v1.2.3 From 635b7625690d9f8f61da0a187e7ed4a7ec274fdc Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Tue, 4 Jun 2019 11:10:03 -0400 Subject: systems: allow passing in string for cross/localSystem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes things a little bit more convenient. Just pass in like: $ nix-build ’’ -A hello --argstr localSystem x86_64-linux --argstr crossSystem aarch64-linux --- lib/systems/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/systems/default.nix b/lib/systems/default.nix index ea18904cc635..8aa413f53817 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -14,7 +14,9 @@ rec { # `parsed` is inferred from args, both because there are two options with one # clearly prefered, and to prevent cycles. A simpler fixed point where the RHS # always just used `final.*` would fail on both counts. - elaborate = args: let + elaborate = args': let + args = if lib.isString args' then { system = args'; } + else args'; final = { # Prefer to parse `config` as it is strictly more informative. parsed = parse.mkSystemFromString (if args ? config then args.config else args.system); -- cgit v1.2.3