diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-05-19 18:38:50 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-05-19 18:38:50 +0200 |
commit | b4e94e5ffeb834f96c5f3338c36b22fc13bd0cee (patch) | |
tree | 7ef390d89c9728a9cb9550626d749b7c643c32ab /stdenv_prefix/stdenv.md | |
parent | 1cdd8f9cfc60dcda3fa38a0e52b03ddae91bd1b7 (diff) | |
download | Nixies-b4e94e5ffeb834f96c5f3338c36b22fc13bd0cee.tar.gz Nixies-b4e94e5ffeb834f96c5f3338c36b22fc13bd0cee.tar.zst Nixies-b4e94e5ffeb834f96c5f3338c36b22fc13bd0cee.zip |
Add stdenv_prefix
Diffstat (limited to 'stdenv_prefix/stdenv.md')
-rw-r--r-- | stdenv_prefix/stdenv.md | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/stdenv_prefix/stdenv.md b/stdenv_prefix/stdenv.md new file mode 100644 index 0000000..f58455a --- /dev/null +++ b/stdenv_prefix/stdenv.md | |||
@@ -0,0 +1,133 @@ | |||
1 | Ce dossier contient un travail permettant de créer des dérivations qui | ||
2 | vont toutes commencer par un préfix de taille et avec un nombre de | ||
3 | composants donné (de la forme x/x/xxxxx) | ||
4 | |||
5 | Le but étant de pouvoir copier une closure d’une dérivation, la mettre | ||
6 | par exemple dans /opt/nix/store/....-foo et avec un simple `rename` + | ||
7 | `sed` la rendre utilisable (dans l’exemple /nix/store/....-foo/xxx -> | ||
8 | /opt/nix/store/....-foo). | ||
9 | |||
10 | Ci dessous se trouvent des notes de ce que j’ai compris de la stack | ||
11 | stdenv (pkgs/stdenv/linux/default.nix) | ||
12 | |||
13 | # Stage -1 | ||
14 | gcc-unwrapped = null | ||
15 | binutils = null | ||
16 | coreutils = null | ||
17 | gnugrep = null | ||
18 | `stagem1 = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages` | ||
19 | -> contient cinq entrées (dont stdenv "invalide") | ||
20 | |||
21 | # Stage 0 | ||
22 | `stage0 = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages` | ||
23 | (`stagem1 = stage0.stdenv.__bootPackages`) | ||
24 | `stage0.stdenv` | ||
25 | -> cc = null | ||
26 | `stage0` | ||
27 | overrides: | ||
28 | - glibc = extrait (ln -s) de bootstrapTools (bootstrap-stage0-glibc) | ||
29 | - gcc-unwrapped = bootstrapTools | ||
30 | - binutils = wrapper sur bootstrapTools (bootstrap-stage0-binutils-wrapper) | ||
31 | - coreutils = bootstrapTools | ||
32 | - gnugrep = bootstrapTools | ||
33 | - ccWrapperStdenv = stage0.stdenv | ||
34 | |||
35 | # Stage 1 | ||
36 | `stage1 = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages` | ||
37 | (`stage0 = stage1.stdenv.__bootPackages`) | ||
38 | `stage1.stdenv` | ||
39 | -> cc = cc-wrapper buildé avec | ||
40 | cc = stage0.gcc-unwrapped = bootstrapTools | ||
41 | bintools = stage0.binutils = bootstrap-stage0-binutils-wrapper | ||
42 | glibc = stage0.glibc = bootstrap-stage0-glibc | ||
43 | coreutils = stage0.coreutils = bootstrapTools | ||
44 | gnugrep = stage0.gnugrep = bootstrapTools | ||
45 | stdenvNoCC = stage0.ccWrapperStdenv = stage0.stdenv | ||
46 | `stage1` | ||
47 | overrides: | ||
48 | - binutils-unwrapped = override (gold = false) | ||
49 | - ccWrapperStdenv = stage0.stdenv | ||
50 | - gcc-unwrapped = bootstrapTools | ||
51 | - coreutils = bootstrapTools | ||
52 | - gnugrep = bootstrapTools | ||
53 | - glibc = bootstrap-stage0-glibc | ||
54 | - perl = override (threading = false) | ||
55 | |||
56 | # Stage 2 | ||
57 | `stage2 = stdenv.__bootPackages.stdenv.__bootPackages.stdenv.__bootPackages` | ||
58 | (`stage1 = stage2.stdenv.__bootPackages`) | ||
59 | `stage2.stdenv` | ||
60 | -> cc = cc-wrapper buildé avec | ||
61 | cc = stage1.gcc-unwrapped = bootstrapTools | ||
62 | bintools = stage1.binutils = wrapper sur binutils-unwrapped (gold = false) | ||
63 | glibc = bootstrap-stage0-glibc | ||
64 | coreutils = bootstrapTools | ||
65 | gnugrep = bootstrapTools | ||
66 | stdenvNoCC = stage1.ccWrapperStdenv = stage0.stdenv | ||
67 | `stage2` | ||
68 | overrides: | ||
69 | - ccWrapperStdenv = stage0.stdenv | ||
70 | - gcc-unwrapped = bootstrapTools | ||
71 | - coreutils = bootstrapTools | ||
72 | - gnugrep = bootstrapTools | ||
73 | - perl = override (threading = false) | ||
74 | - binutils = stage1.override (libc = self.glibc) | ||
75 | - libidn2 = nuke-refs | ||
76 | - libunistring = nuke-refs | ||
77 | - dejagnu = nocheck | ||
78 | - gnum4 = stage1.gnum4 | ||
79 | - bison = stage1.bison | ||
80 | |||
81 | # Stage 3 | ||
82 | `stage3 = stdenv.__bootPackages.stdenv.__bootPackages` | ||
83 | (`stage2 = stage3.stdenv.__bootPackages`) | ||
84 | `stage3.stdenv` | ||
85 | -> cc = cc-wrapper buildé avec | ||
86 | cc = stage2.gcc-unwrapped = bootstrapTools | ||
87 | bintools = stage2.binutils | ||
88 | glibc = stage2.glibc | ||
89 | coreutils = bootstrapTools | ||
90 | gnugrep = bootstrapTools | ||
91 | stdenvNoCC = stage2.ccWrapperStdenv = stage0.stdenv | ||
92 | `stage3` | ||
93 | overrides: | ||
94 | - ccWrapperStdenv = stage0.stdenv | ||
95 | - binutils = stage2.binutils | ||
96 | - coreutils = bootstrapTools | ||
97 | - gnugrep = bootstrapTools | ||
98 | - perl patchelf linuxHeaders gnum4 bison libidn2 libunistring = stage2 | ||
99 | - glibc = stage2.glibc | ||
100 | - gmp mpfr libmpc isl_0_20 = override static | ||
101 | - gcc-unwrapped = override (isl) | ||
102 | |||
103 | # Stage 4 | ||
104 | `stage4 = stdenv.__bootPackages` | ||
105 | (`stage3 = stage4.stdenv.__bootPackages`) | ||
106 | `stage4.stdenv` | ||
107 | -> cc = cc-wrapper buildé avec | ||
108 | cc = stage3.gcc-unwrapped = override (isl) | ||
109 | bintools = stage2.binutils | ||
110 | glibc = stage2.glibc | ||
111 | coreutils = bootstrapTools | ||
112 | gnugrep = bootstrapTools | ||
113 | stdenvNoCC = stage3.ccWrapperStdenv = stage0.stdenv | ||
114 | `stage4` | ||
115 | overrides: | ||
116 | - gettext gnum4 bison gmp perl texinfo zlib linuxHeaders libidn2 libunistring = stage3 | ||
117 | - glibc = stage3.glibc = stage2.glibc | ||
118 | - binutils = override | ||
119 | - gcc = buildé avec | ||
120 | cc = stage3.gcc-unwrapped | ||
121 | bintools = self.binutils | ||
122 | libc = self.glibc | ||
123 | stdenvNoCC coreutils gnugrep = self | ||
124 | |||
125 | # Final Stage | ||
126 | `stdenv` | ||
127 | cc = stage4.gcc | ||
128 | `pkgs` | ||
129 | overrides: | ||
130 | - glibc = stage4.glibc = stage2.glibc | ||
131 | - zlib libidn2 libunistring = stage4 = stage3 | ||
132 | - (hors cross-compile) binutils binutils-unwrapped = stage4 | ||
133 | - (hors cross-compile) gcc = cc | ||