mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
docs: Building a stdenv package in nix-shell (#216650)
* docs: Building a stdenv package in nix-shell
This commit is contained in:
parent
ac1f5b72a9
commit
121fbb3cf7
1 changed files with 21 additions and 0 deletions
|
@ -95,6 +95,27 @@ installPhase() {
|
||||||
genericBuild
|
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}
|
## Tools provided by `stdenv` {#sec-tools-of-stdenv}
|
||||||
|
|
||||||
The standard environment provides the following packages:
|
The standard environment provides the following packages:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue