blob: 69ef515a39a20f021c0beb63e52dbb4c60f53e7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
---
tags:
- nix
---
Is itself a derivation containing a file `setup`. It is basically a builder.
Exposed by nixpkgs so we can call it from nix:
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/make-derivation.nix
Runs in phases:
- unpackPhase
- configurePhase
- buildPhase
- checkPhase
- installPhase
- fixupPhase
```console
nix-build '<nixpkgs>' -A stdenv
/nix/store/k4jklkcag4zq4xkqhkpy156mgfm34ipn-stdenv
```
```console
ls -R result/
result/:
nix-support/ setup
result/nix-support:
propagated-user-env-packages
```
```console
nix-store -q --references result
/nix/store/3a45nb37s0ndljp68228snsqr3qsyp96-bzip2-1.0.6
/nix/store/a457ywa1haa0sgr9g7a1pgldrg3s798d-coreutils-8.24
/nix/store/zmd4jk4db5lgxb8l93mhkvr3x92g2sx2-bash-4.3-p39
/nix/store/47sfpm2qclpqvrzijizimk4md1739b1b-gcc-wrapper-4.9.3
...
```
```console
head result/setup
export SHELL=/nix/store/zmd4jk4db5lgxb8l93mhkvr3x92g2sx2-bash-4.3-p39/bin/bash
initialPath="/nix/store/a457ywa1haa0sgr9g7a1pgldrg3s798d-coreutils-8.24 ..."
defaultNativeBuildInputs="/nix/store/sgwq15xg00xnm435gjicspm048rqg9y6-patchelf-0.8 ..."
```
---
https://nixos.org/guides/nix-pills/19-fundamentals-of-stdenv.html
https://nixos.org/manual/nixpkgs/stable/#chap-stdenv
|