mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 03:56:01 +01:00
Enable syntax highlighting
This commit is contained in:
parent
0c94c17644
commit
1d0a7b54fa
46 changed files with 1770 additions and 1155 deletions
|
|
@ -66,20 +66,24 @@ The following common options are supported:
|
|||
|
||||
# Examples
|
||||
|
||||
$ nix-build '<nixpkgs>' -A firefox
|
||||
store derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv
|
||||
/nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||
```console
|
||||
$ nix-build '<nixpkgs>' -A firefox
|
||||
store derivation is /nix/store/qybprl8sz2lc...-firefox-1.5.0.7.drv
|
||||
/nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||
|
||||
$ ls -l result
|
||||
lrwxrwxrwx ... result -> /nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||
$ ls -l result
|
||||
lrwxrwxrwx ... result -> /nix/store/d18hyl92g30l...-firefox-1.5.0.7
|
||||
|
||||
$ ls ./result/bin/
|
||||
firefox firefox-config
|
||||
$ ls ./result/bin/
|
||||
firefox firefox-config
|
||||
```
|
||||
|
||||
If a derivation has multiple outputs, `nix-build` will build the default
|
||||
(first) output. You can also build all outputs:
|
||||
|
||||
$ nix-build '<nixpkgs>' -A openssl.all
|
||||
```console
|
||||
$ nix-build '<nixpkgs>' -A openssl.all
|
||||
```
|
||||
|
||||
This will create a symlink for each output named `result-outputname`.
|
||||
The suffix is omitted if the output name is `out`. So if `openssl` has
|
||||
|
|
@ -87,19 +91,23 @@ outputs `out`, `bin` and `man`, `nix-build` will create symlinks
|
|||
`result`, `result-bin` and `result-man`. It’s also possible to build a
|
||||
specific output:
|
||||
|
||||
$ nix-build '<nixpkgs>' -A openssl.man
|
||||
```console
|
||||
$ nix-build '<nixpkgs>' -A openssl.man
|
||||
```
|
||||
|
||||
This will create a symlink `result-man`.
|
||||
|
||||
Build a Nix expression given on the command line:
|
||||
|
||||
$ nix-build -E 'with import <nixpkgs> { }; runCommand "foo" { } "echo bar > $out"'
|
||||
$ cat ./result
|
||||
bar
|
||||
```console
|
||||
$ nix-build -E 'with import <nixpkgs> { }; runCommand "foo" { } "echo bar > $out"'
|
||||
$ cat ./result
|
||||
bar
|
||||
```
|
||||
|
||||
Build the GNU Hello package from the latest revision of the master
|
||||
branch of Nixpkgs:
|
||||
|
||||
$ nix-build https://github.com/NixOS/nixpkgs/archive/master.tar.gz -A hello
|
||||
|
||||
# Environment variables
|
||||
```console
|
||||
$ nix-build https://github.com/NixOS/nixpkgs/archive/master.tar.gz -A hello
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue