diff --git a/doc/contributing.xml b/doc/contributing.xml index d28442b7a2c6..523c1c9c8f03 100644 --- a/doc/contributing.xml +++ b/doc/contributing.xml @@ -12,9 +12,9 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc You can quickly check your edits with make: - $ cd /path/to/nixpkgs/doc - $ nix-shell - [nix-shell]$ make +$ cd /path/to/nixpkgs/doc +$ nix-shell +[nix-shell]$ make If you experience problems, run make debug to help @@ -24,10 +24,10 @@ xlink:href="https://github.com/NixOS/nixpkgs/tree/master/doc">doc After making modifications to the manual, it's important to build it before committing. You can do that as follows: - $ cd /path/to/nixpkgs/doc - $ nix-shell - [nix-shell]$ make clean - [nix-shell]$ nix-build . +$ cd /path/to/nixpkgs/doc +$ nix-shell +[nix-shell]$ make clean +[nix-shell]$ nix-build . If the build succeeds, the manual will be in ./result/share/doc/nixpkgs/manual.html. diff --git a/doc/functions/appimagetools.xml b/doc/functions/appimagetools.xml index 4205c6da3851..e6dbc22f48dd 100644 --- a/doc/functions/appimagetools.xml +++ b/doc/functions/appimagetools.xml @@ -52,7 +52,7 @@ spot sensor temperature 0.000000, unit celsius, color scheme 0, calibration: off $ file -k type2.AppImage type2.AppImage: ELF 64-bit LSB executable, x86-64, version 1 (SYSV) (Lepton 3.x), scale 232-60668, spot sensor temperature -4.187500, color scheme 15, show scale bar, calibration: offset -0.000000, slope 0.000000 (Lepton 2.x), scale 4111-45000, spot sensor temperature 412442.250000, color scheme 3, minimum point enabled, calibration: offset -75402534979642766821519867692934234112.000000, slope 5815371847733706829839455140374904832.000000, dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.18, BuildID[sha1]=79dcc4e55a61c293c5e19edbd8d65b202842579f, stripped\012- data - + Note how the type 1 AppImage is described as an ISO 9660 CD-ROM diff --git a/doc/functions/dockertools.xml b/doc/functions/dockertools.xml index e95ce1979ded..a042013b8e70 100644 --- a/doc/functions/dockertools.xml +++ b/doc/functions/dockertools.xml @@ -537,7 +537,7 @@ exportImage { name = someLayeredImage.name; } - + diff --git a/doc/functions/prefer-remote-fetch.xml b/doc/functions/prefer-remote-fetch.xml index 2ccad9218062..3e43fd28ade8 100644 --- a/doc/functions/prefer-remote-fetch.xml +++ b/doc/functions/prefer-remote-fetch.xml @@ -10,16 +10,16 @@ upload while the builder can fetch faster directly from the source. To use it, put the following snippet as a new overlay: - self: super: - (super.prefer-remote-fetch self super) - +self: super: + (super.prefer-remote-fetch self super) + A full configuration example for that sets the overlay up for your own account, could look like this - - $ mkdir ~/.config/nixpkgs/overlays/ - $ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF - self: super: super.prefer-remote-fetch self super - EOF - + +$ mkdir ~/.config/nixpkgs/overlays/ +$ cat > ~/.config/nixpkgs/overlays/prefer-remote-fetch.nix <<EOF + self: super: super.prefer-remote-fetch self super +EOF + diff --git a/doc/functions/trivial-builders.xml b/doc/functions/trivial-builders.xml index 1fd92ecfe262..0211a4f31728 100644 --- a/doc/functions/trivial-builders.xml +++ b/doc/functions/trivial-builders.xml @@ -35,25 +35,25 @@ An example of using runCommand is provided below. - (import <nixpkgs> {}).runCommand "my-example" {} '' - echo My example command is running +(import <nixpkgs> {}).runCommand "my-example" {} '' + echo My example command is running - mkdir $out + mkdir $out - echo I can write data to the Nix store > $out/message + echo I can write data to the Nix store > $out/message - echo I can also run basic commands like: + echo I can also run basic commands like: - echo ls - ls + echo ls + ls - echo whoami - whoami + echo whoami + whoami - echo date - date - '' - + echo date + date +'' + diff --git a/doc/languages-frameworks/beam.xml b/doc/languages-frameworks/beam.xml index ac7a83ed4265..b896b564fb7c 100644 --- a/doc/languages-frameworks/beam.xml +++ b/doc/languages-frameworks/beam.xml @@ -140,7 +140,7 @@ beamPackages.jiffy jiffy-0.14.5 beamPackages.lager lager-3.0.2 beamPackages.meck meck-0.8.3 beamPackages.rebar3-pc pc-1.1.0 - + To install any of those packages into your profile, refer to them by their @@ -149,7 +149,7 @@ beamPackages.rebar3-pc pc-1.1.0 $ nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse - + The attribute path of any BEAM package corresponds to the name of that @@ -178,22 +178,22 @@ $ nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse - { stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }: +{ stdenv, fetchFromGitHub, buildRebar3, ibrowse, jsx, erlware_commons }: - buildRebar3 rec { - name = "hex2nix"; - version = "0.0.1"; +buildRebar3 rec { + name = "hex2nix"; + version = "0.0.1"; - src = fetchFromGitHub { - owner = "ericbmerritt"; - repo = "hex2nix"; - rev = "${version}"; - sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg"; - }; + src = fetchFromGitHub { + owner = "ericbmerritt"; + repo = "hex2nix"; + rev = "${version}"; + sha256 = "1w7xjidz1l5yjmhlplfx7kphmnpvqm67w99hd2m7kdixwdxq0zqg"; + }; - beamDeps = [ ibrowse jsx erlware_commons ]; - } - + beamDeps = [ ibrowse jsx erlware_commons ]; +} + Such derivations are callable with @@ -228,29 +228,29 @@ $ nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse - { buildErlangMk, fetchHex, cowlib, ranch }: +{ buildErlangMk, fetchHex, cowlib, ranch }: - buildErlangMk { - name = "cowboy"; - version = "1.0.4"; +buildErlangMk { + name = "cowboy"; + version = "1.0.4"; - src = fetchHex { - pkg = "cowboy"; - version = "1.0.4"; - sha256 = "6a0edee96885fae3a8dd0ac1f333538a42e807db638a9453064ccfdaa6b9fdac"; - }; + src = fetchHex { + pkg = "cowboy"; + version = "1.0.4"; + sha256 = "6a0edee96885fae3a8dd0ac1f333538a42e807db638a9453064ccfdaa6b9fdac"; + }; - beamDeps = [ cowlib ranch ]; + beamDeps = [ cowlib ranch ]; - meta = { - description = '' - Small, fast, modular HTTP server written in Erlang - ''; - license = stdenv.lib.licenses.isc; - homepage = https://github.com/ninenines/cowboy; - }; - } - + meta = { + description = '' + Small, fast, modular HTTP server written in Erlang + ''; + license = stdenv.lib.licenses.isc; + homepage = https://github.com/ninenines/cowboy; + }; +} +
@@ -262,56 +262,56 @@ $ nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse - { buildMix, fetchHex, plug, absinthe }: +{ buildMix, fetchHex, plug, absinthe }: - buildMix { - name = "absinthe_plug"; - version = "1.0.0"; +buildMix { + name = "absinthe_plug"; + version = "1.0.0"; - src = fetchHex { - pkg = "absinthe_plug"; - version = "1.0.0"; - sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; - }; + src = fetchHex { + pkg = "absinthe_plug"; + version = "1.0.0"; + sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; + }; - beamDeps = [ plug absinthe ]; + beamDeps = [ plug absinthe ]; - meta = { - description = '' - A plug for Absinthe, an experimental GraphQL toolkit - ''; - license = stdenv.lib.licenses.bsd3; - homepage = https://github.com/CargoSense/absinthe_plug; - }; - } - + meta = { + description = '' + A plug for Absinthe, an experimental GraphQL toolkit + ''; + license = stdenv.lib.licenses.bsd3; + homepage = https://github.com/CargoSense/absinthe_plug; + }; +} + Alternatively, we can use buildHex as a shortcut: - { buildHex, buildMix, plug, absinthe }: +{ buildHex, buildMix, plug, absinthe }: - buildHex { - name = "absinthe_plug"; - version = "1.0.0"; +buildHex { + name = "absinthe_plug"; + version = "1.0.0"; - sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; + sha256 = "08459823fe1fd4f0325a8bf0c937a4520583a5a26d73b193040ab30a1dfc0b33"; - builder = buildMix; + builder = buildMix; - beamDeps = [ plug absinthe ]; + beamDeps = [ plug absinthe ]; - meta = { - description = '' - A plug for Absinthe, an experimental GraphQL toolkit - ''; - license = stdenv.lib.licenses.bsd3; - homepage = https://github.com/CargoSense/absinthe_plug; - }; - } - + meta = { + description = '' + A plug for Absinthe, an experimental GraphQL toolkit + ''; + license = stdenv.lib.licenses.bsd3; + homepage = https://github.com/CargoSense/absinthe_plug; + }; +} +
@@ -330,47 +330,47 @@ $ nix-env -f "<nixpkgs>" -iA beamPackages.ibrowse could do the following:
- - $ nix-shell -A beamPackages.ibrowse.env --run "erl" - Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] + +$ nix-shell -A beamPackages.ibrowse.env --run "erl" +Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] - Eshell V7.0 (abort with ^G) - 1> m(ibrowse). - Module: ibrowse - MD5: 3b3e0137d0cbb28070146978a3392945 - Compiled: January 10 2016, 23:34 - Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam - Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"}, - debug_info,debug_info,nowarn_shadow_vars, - warn_unused_import,warn_unused_vars,warnings_as_errors, - {i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}] - Exports: - add_config/1 send_req_direct/7 - all_trace_off/0 set_dest/3 - code_change/3 set_max_attempts/3 - get_config_value/1 set_max_pipeline_size/3 - get_config_value/2 set_max_sessions/3 - get_metrics/0 show_dest_status/0 - get_metrics/2 show_dest_status/1 - handle_call/3 show_dest_status/2 - handle_cast/2 spawn_link_worker_process/1 - handle_info/2 spawn_link_worker_process/2 - init/1 spawn_worker_process/1 - module_info/0 spawn_worker_process/2 - module_info/1 start/0 - rescan_config/0 start_link/0 - rescan_config/1 stop/0 - send_req/3 stop_worker_process/1 - send_req/4 stream_close/1 - send_req/5 stream_next/1 - send_req/6 terminate/2 - send_req_direct/4 trace_off/0 - send_req_direct/5 trace_off/2 - send_req_direct/6 trace_on/0 - trace_on/2 - ok - 2> - +Eshell V7.0 (abort with ^G) +1> m(ibrowse). +Module: ibrowse +MD5: 3b3e0137d0cbb28070146978a3392945 +Compiled: January 10 2016, 23:34 +Object file: /nix/store/g1rlf65rdgjs4abbyj4grp37ry7ywivj-ibrowse-4.2.2/lib/erlang/lib/ibrowse-4.2.2/ebin/ibrowse.beam +Compiler options: [{outdir,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/ebin"}, +debug_info,debug_info,nowarn_shadow_vars, +warn_unused_import,warn_unused_vars,warnings_as_errors, +{i,"/tmp/nix-build-ibrowse-4.2.2.drv-0/hex-source-ibrowse-4.2.2/_build/default/lib/ibrowse/include"}] +Exports: +add_config/1 send_req_direct/7 +all_trace_off/0 set_dest/3 +code_change/3 set_max_attempts/3 +get_config_value/1 set_max_pipeline_size/3 +get_config_value/2 set_max_sessions/3 +get_metrics/0 show_dest_status/0 +get_metrics/2 show_dest_status/1 +handle_call/3 show_dest_status/2 +handle_cast/2 spawn_link_worker_process/1 +handle_info/2 spawn_link_worker_process/2 +init/1 spawn_worker_process/1 +module_info/0 spawn_worker_process/2 +module_info/1 start/0 +rescan_config/0 start_link/0 +rescan_config/1 stop/0 +send_req/3 stop_worker_process/1 +send_req/4 stream_close/1 +send_req/5 stream_next/1 +send_req/6 terminate/2 +send_req_direct/4 trace_off/0 +send_req_direct/5 trace_off/2 +send_req_direct/6 trace_on/0 +trace_on/2 +ok +2> + Notice the -A beamPackages.ibrowse.env. That is the key @@ -408,7 +408,7 @@ let in drv - +
Building in a Shell (for Mix Projects) @@ -474,7 +474,7 @@ plt: analyze: build plt $(NIX_SHELL) --run "mix dialyzer --no-compile" - + Using a shell.nix as described (see @@ -513,9 +513,9 @@ analyze: build plt nixpkgs repository: - -$ nix-build -A beamPackages - + +$ nix-build -A beamPackages + That will attempt to build every package in beamPackages. diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml index 6f6e7925a1b5..b2b4962cb5f6 100644 --- a/doc/languages-frameworks/go.xml +++ b/doc/languages-frameworks/go.xml @@ -218,12 +218,12 @@ deis = buildGoPackage rec { bin includes program binaries. You can test build a Go binary as follows: - $ nix-build -A deis.bin - +$ nix-build -A deis.bin + or build all outputs with: - $ nix-build -A deis.all - +$ nix-build -A deis.all + bin output will be installed by default with nix-env -i or systemPackages. diff --git a/doc/languages-frameworks/lua.xml b/doc/languages-frameworks/lua.xml index 210140299960..5144bb24ff6e 100644 --- a/doc/languages-frameworks/lua.xml +++ b/doc/languages-frameworks/lua.xml @@ -29,7 +29,7 @@ fileSystem = buildLuaPackage { maintainers = with maintainers; [ flosse ]; }; }; - + diff --git a/doc/languages-frameworks/ocaml.xml b/doc/languages-frameworks/ocaml.xml index 0deadf2edd03..b7006ecba998 100644 --- a/doc/languages-frameworks/ocaml.xml +++ b/doc/languages-frameworks/ocaml.xml @@ -62,7 +62,7 @@ buildDunePackage rec { maintainers = with stdenv.lib.maintainers; [ sternenseemann ]; }; } - + Here is a second example, this time using a source archive generated with @@ -93,5 +93,5 @@ buildDunePackage rec { maintainers = [ maintainers.eqyiel ]; }; } - +
diff --git a/doc/languages-frameworks/texlive.xml b/doc/languages-frameworks/texlive.xml index 5792a16963a9..97f274933bef 100644 --- a/doc/languages-frameworks/texlive.xml +++ b/doc/languages-frameworks/texlive.xml @@ -26,7 +26,7 @@ texlive.combine { inherit (texlive) scheme-small collection-langkorean algorithms cm-super; } - + There are all the schemes, collections and a few thousand packages, as defined upstream (perhaps with tiny differences).
@@ -44,7 +44,7 @@ texlive.combine { # elem tlType [ "run" "bin" "doc" "source" ] # there are also other attributes: version, name } - +
diff --git a/doc/platform-notes.xml b/doc/platform-notes.xml index b75b50dbb962..157d3fe2fcdd 100644 --- a/doc/platform-notes.xml +++ b/doc/platform-notes.xml @@ -20,14 +20,14 @@ scripts. - stdenv.mkDerivation { - name = "libfoo-1.2.3"; - # ... - buildPhase = '' - $CC -o hello hello.c - ''; - } - +stdenv.mkDerivation { + name = "libfoo-1.2.3"; + # ... + buildPhase = '' + $CC -o hello hello.c + ''; +} + @@ -39,12 +39,12 @@ fixupPhase. - stdenv.mkDerivation { - name = "libfoo-1.2.3"; - # ... - makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib"; - } - +stdenv.mkDerivation { + name = "libfoo-1.2.3"; + # ... + makeFlags = stdenv.lib.optional stdenv.isDarwin "LDFLAGS=-Wl,-install_name,$(out)/lib/libfoo.dylib"; +} + @@ -62,19 +62,19 @@ 1 manpage. - dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib - Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq - Reason: image not found - ./tests/jqtest: line 5: 75779 Abort trap: 6 - +dyld: Library not loaded: /nix/store/7hnmbscpayxzxrixrgxvvlifzlxdsdir-jq-1.5-lib/lib/libjq.1.dylib +Referenced from: /private/tmp/nix-build-jq-1.5.drv-0/jq-1.5/tests/../jq +Reason: image not found +./tests/jqtest: line 5: 75779 Abort trap: 6 + - stdenv.mkDerivation { - name = "libfoo-1.2.3"; - # ... - doInstallCheck = true; - installCheckTarget = "check"; - } - +stdenv.mkDerivation { + name = "libfoo-1.2.3"; + # ... + doInstallCheck = true; + installCheckTarget = "check"; +} + @@ -85,15 +85,15 @@ on xcode. - stdenv.mkDerivation { - name = "libfoo-1.2.3"; - # ... - prePatch = '' - substituteInPlace Makefile \ - --replace '/usr/bin/xcrun clang' clang - ''; - } - +stdenv.mkDerivation { + name = "libfoo-1.2.3"; + # ... + prePatch = '' + substituteInPlace Makefile \ + --replace '/usr/bin/xcrun clang' clang + ''; +} + The package xcbuild can be used to build projects that really depend on Xcode. However, this replacement is not 100% compatible diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 2447dc451301..dbffdad9fdee 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -343,7 +343,7 @@ let f(h, t, i) = i + (if i <= 0 then h else t - 1) let f(h, h + 1, i) = i + (if i <= 0 then h else (h + 1) - 1) let f(h, h + 1, i) = i + (if i <= 0 then h else h) let f(h, h + 1, i) = i + h - + This is where "sum-like" comes in from above: We can just sum all of the host offsets to get the host offset of the transitive dependency. The target offset is the transitive dependency is simply the host offset + 1, just as @@ -2229,7 +2229,7 @@ someVar=$(stripHash $name) array by doing something like addEnvHooks "$hostOffset" myBashFunction - + @@ -2667,8 +2667,8 @@ addEnvHooks "$hostOffset" myBashFunction that is supposed to be inspected, add breakpointHook to nativeBuildInputs. - nativeBuildInputs = [ breakpointHook ]; - +nativeBuildInputs = [ breakpointHook ]; + When a build failure happens there will be an instruction printed that shows how to attach with cntr to the build sandbox. @@ -2863,7 +2863,7 @@ addEnvHooks "$hostOffset" myBashFunction printf(help_message); ^ cc1plus: some warnings being treated as errors - + @@ -2885,7 +2885,7 @@ cc1plus: some warnings being treated as errors bin/blib.a(bios_console.o): In function `bios_handle_cup': /tmp/nix-build-ipxe-20141124-5cbdc41.drv-0/ipxe-5cbdc41/src/arch/i386/firmware/pcbios/bios_console.c:86: undefined reference to `__stack_chk_fail' - + @@ -2914,19 +2914,19 @@ bin/blib.a(bios_console.o): In function `bios_handle_cup': malloc.c:404:15: error: return type is an incomplete type malloc.c:410:19: error: storage size of 'ms' isn't known - + strdup.h:22:1: error: expected identifier or '(' before '__extension__' - + strsep.c:65:23: error: register name not specified for 'delim' - + installwatch.c:3751:5: error: conflicting types for '__open_2' - + fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open with O_CREAT or O_TMPFILE in second argument needs 3 arguments - + @@ -2951,7 +2951,7 @@ fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute erro ccbLfRgg.s: Assembler messages: ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_len@GOTOFF' - + @@ -3015,7 +3015,7 @@ ccbLfRgg.s:33: Error: missing or invalid displacement expression `private_key_le intel_drv.so: undefined symbol: vgaHWFreeHWRec - + diff --git a/doc/submitting-changes.xml b/doc/submitting-changes.xml index bc090fd757ce..bf9e290fa2f7 100644 --- a/doc/submitting-changes.xml +++ b/doc/submitting-changes.xml @@ -514,7 +514,7 @@ The original commit message describing the reason why the world was torn apart. (cherry picked from commit abcdef) Reason: I just had a gut feeling that this would also be wanted by people from the stone age. - +