diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2023-02-17 00:02:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 00:02:11 +0000 |
commit | e6eaa853121d0afd72c80f5a96c9a25eb9b6354e (patch) | |
tree | 6188462e14623061ed653a4969260ad72b56ea45 /doc | |
parent | f73d36d8528ee9e1f4280579cde4d9aaab6426af (diff) | |
parent | e95204260063aa90718a94eaccac3591a5c64469 (diff) | |
download | nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar.gz nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar.bz2 nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar.lz nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar.xz nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.tar.zst nixpkgs-e6eaa853121d0afd72c80f5a96c9a25eb9b6354e.zip |
Merge master into staging-next
Diffstat (limited to 'doc')
-rw-r--r-- | doc/stdenv/stdenv.chapter.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/stdenv/stdenv.chapter.md b/doc/stdenv/stdenv.chapter.md index dcf173f865f..1488a09982a 100644 --- a/doc/stdenv/stdenv.chapter.md +++ b/doc/stdenv/stdenv.chapter.md @@ -95,6 +95,27 @@ installPhase() { genericBuild ``` +### Building a `stdenv` package in `nix-shell` {#sec-building-stdenv-package-in-nix-shell} + +To build a `stdenv` package in a [`nix-shell`](https://nixos.org/manual/nix/unstable/command-ref/nix-shell.html), use + +```bash +nix-shell '<nixpkgs>' -A some_package +eval ${unpackPhase:-unpackPhase} +cd $sourceRoot +eval ${patchPhase:-patchPhase} +eval ${configurePhase:-configurePhase} +eval ${buildPhase:-buildPhase} +``` + +To modify a [phase](#sec-stdenv-phases), first print it with + +```bash +type buildPhase +``` + +then change it in a text editor, and paste it back to the terminal. + ## Tools provided by `stdenv` {#sec-tools-of-stdenv} The standard environment provides the following packages: |