tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
freshBootstrapTools: avoid top-level with
philiptaron.tngl.sh
2 years ago
0a8120ff
fd5887f5
+11
-11
1 changed file
expand all
collapse all
unified
split
pkgs
stdenv
linux
make-bootstrap-tools.nix
+11
-11
pkgs/stdenv/linux/make-bootstrap-tools.nix
reviewed
···
1
1
{ pkgs ? import ../../.. {} }:
2
2
3
3
let
4
4
+
inherit (pkgs) lib stdenv config;
4
5
libc = pkgs.stdenv.cc.libc;
5
6
patchelf = pkgs.patchelf.overrideAttrs(previousAttrs: {
6
7
NIX_CFLAGS_COMPILE = (previousAttrs.NIX_CFLAGS_COMPILE or []) ++ [ "-static-libgcc" "-static-libstdc++" ];
7
8
NIX_CFLAGS_LINK = (previousAttrs.NIX_CFLAGS_LINK or []) ++ [ "-static-libgcc" "-static-libstdc++" ];
8
9
});
9
9
-
in with pkgs; rec {
10
10
-
11
11
-
12
12
-
coreutilsMinimal = coreutils.override (args: {
10
10
+
in
11
11
+
rec {
12
12
+
coreutilsMinimal = pkgs.coreutils.override (args: {
13
13
# We want coreutils without ACL/attr support.
14
14
aclSupport = false;
15
15
attrSupport = false;
···
17
17
singleBinary = "symlinks";
18
18
});
19
19
20
20
-
tarMinimal = gnutar.override { acl = null; };
20
20
+
tarMinimal = pkgs.gnutar.override { acl = null; };
21
21
22
22
-
busyboxMinimal = busybox.override {
23
23
-
useMusl = lib.meta.availableOn stdenv.hostPlatform musl;
22
22
+
busyboxMinimal = pkgs.busybox.override {
23
23
+
useMusl = lib.meta.availableOn stdenv.hostPlatform pkgs.musl;
24
24
enableStatic = true;
25
25
enableMinimal = true;
26
26
extraConfig = ''
···
34
34
'';
35
35
};
36
36
37
37
-
bootGCC = gcc.cc.override { enableLTO = false; };
38
38
-
bootBinutils = binutils.bintools.override {
37
37
+
bootGCC = pkgs.gcc.cc.override { enableLTO = false; };
38
38
+
bootBinutils = pkgs.binutils.bintools.override {
39
39
withAllTargets = false;
40
40
# Don't need two linkers, disable whatever's not primary/default.
41
41
enableGold = false;
···
43
43
enableShared = false;
44
44
};
45
45
46
46
-
build = callPackage ./stdenv-bootstrap-tools.nix {
46
46
+
build = pkgs.callPackage ./stdenv-bootstrap-tools.nix {
47
47
inherit bootBinutils coreutilsMinimal tarMinimal busyboxMinimal bootGCC libc patchelf;
48
48
};
49
49
···
70
70
}
71
71
else throw "unsupported libc";
72
72
73
73
-
test = callPackage ./test-bootstrap-tools.nix {
73
73
+
test = pkgs.callPackage ./test-bootstrap-tools.nix {
74
74
inherit bootstrapTools;
75
75
inherit (bootstrapFiles) busybox;
76
76
};