Skip to content

Commit 8004e79

Browse files
committedMay 24, 2017
Merge branch 'master' into staging
2 parents 1267b15 + 39e042f commit 8004e79

File tree

104 files changed

+1491
-1566
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1491
-1566
lines changed
 

‎lib/systems/default.nix

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
let inherit (import ../attrsets.nix) mapAttrs; in
2+
13
rec {
24
doubles = import ./doubles.nix;
35
parse = import ./parse.nix;
6+
inspect = import ./inspect.nix;
47
platforms = import ./platforms.nix;
58

69
# Elaborate a `localSystem` or `crossSystem` so that it contains everything
@@ -18,6 +21,13 @@ rec {
1821
config = parse.tripleFromSystem final.parsed;
1922
# Just a guess, based on `system`
2023
platform = platforms.selectBySystem final.system;
21-
} // args;
24+
libc =
25+
/**/ if final.isDarwin then "libSystem"
26+
else if final.isMinGW then "msvcrt"
27+
else if final.isLinux then "glibc"
28+
# TODO(@Ericson2314) think more about other operating systems
29+
else "native/impure";
30+
} // mapAttrs (n: v: v final.parsed) inspect.predicates
31+
// args;
2232
in final;
2333
}

‎lib/systems/doubles.nix

+20-18
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
let lists = import ../lists.nix; in
2-
let parse = import ./parse.nix; in
3-
let inherit (import ../attrsets.nix) matchAttrs; in
4-
51
let
2+
lists = import ../lists.nix;
3+
parse = import ./parse.nix;
4+
inherit (import ./inspect.nix) predicates;
5+
inherit (import ../attrsets.nix) matchAttrs;
6+
67
all = [
78
"aarch64-linux"
89
"armv5tel-linux" "armv6l-linux" "armv7l-linux"
@@ -25,20 +26,21 @@ in rec {
2526
allBut = platforms: lists.filter (x: !(builtins.elem x platforms)) all;
2627
none = [];
2728

28-
arm = filterDoubles (matchAttrs { cpu = { family = "arm"; bits = 32; }; });
29-
i686 = filterDoubles parse.isi686;
30-
mips = filterDoubles (matchAttrs { cpu = { family = "mips"; }; });
31-
x86_64 = filterDoubles parse.isx86_64;
32-
33-
cygwin = filterDoubles parse.isCygwin;
34-
darwin = filterDoubles parse.isDarwin;
35-
freebsd = filterDoubles (matchAttrs { kernel = parse.kernels.freebsd; });
36-
gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; }); # Should be better
37-
illumos = filterDoubles (matchAttrs { kernel = parse.kernels.solaris; });
38-
linux = filterDoubles parse.isLinux;
39-
netbsd = filterDoubles (matchAttrs { kernel = parse.kernels.netbsd; });
40-
openbsd = filterDoubles (matchAttrs { kernel = parse.kernels.openbsd; });
41-
unix = filterDoubles parse.isUnix;
29+
arm = filterDoubles predicates.isArm32;
30+
i686 = filterDoubles predicates.isi686;
31+
mips = filterDoubles predicates.isMips;
32+
x86_64 = filterDoubles predicates.isx86_64;
33+
34+
cygwin = filterDoubles predicates.isCygwin;
35+
darwin = filterDoubles predicates.isDarwin;
36+
freebsd = filterDoubles predicates.isFreeBSD;
37+
# Should be better, but MinGW is unclear, and HURD is bit-rotted.
38+
gnu = filterDoubles (matchAttrs { kernel = parse.kernels.linux; abi = parse.abis.gnu; });
39+
illumos = filterDoubles predicates.isSunOS;
40+
linux = filterDoubles predicates.isLinux;
41+
netbsd = filterDoubles predicates.isNetBSD;
42+
openbsd = filterDoubles predicates.isOpenBSD;
43+
unix = filterDoubles predicates.isUnix;
4244

4345
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux"];
4446
}

2 commit comments

Comments
 (2)

copumpkin commented on Oct 26, 2017

@copumpkin
Member

@vcunat this commit seems to have actually edited the https://github.com/NixOS/nixpkgs/blob/master/maintainers/scripts/rebuild-amount.sh script. Was that some sort of messy merge or did you actually change the script and commit it in the merge?

vcunat commented on Oct 26, 2017

@vcunat
MemberAuthor

@copumpkin: yes, I found out some time after the commit. I originally intended to make the change in the script into a proper commit, but I needed to use it before that, and that resulted into it sneaking into this merge.

Please sign in to comment.