git.iko.soy/typeable/nixpkgs
on master help sign in
doc: Improve code listings

By adding prompts and removing unnecessary indentation.

commite1af37634b387e18361f15b2db1c7f7f93d37ebc authorJan Tojnar <jtojnar@gmail.com> dateWed 23 Sep 2020, 00:38 (6 years ago) parent4729748
13 files changed+179−167
doc/builders/images/dockertools.xml+6−6 doc/builders/images/ocitools.xml+1−2 doc/builders/packages/citrix.xml+4−4 doc/builders/packages/urxvt.xml+32−18 doc/contributing/submitting-changes.xml+6−6 doc/languages-frameworks/beam.xml+3−3 doc/languages-frameworks/perl.xml+99−99 doc/languages-frameworks/qt.xml+1−1 doc/languages-frameworks/ruby.xml+12−13 doc/languages-frameworks/texlive.xml+5−5 doc/stdenv/multiple-output.xml+1−1 doc/using/configuration.xml+4−4 doc/using/overlays.xml+5−5
doc/builders/images/dockertools.xml+6−6
@@ -132,11 +132,11 @@ buildImage {
132132 <para>
133133 By default <function>buildImage</function> will use a static date of one second past the UNIX Epoch. This allows <function>buildImage</function> to produce binary reproducible images. When listing images with <command>docker images</command>, the newly created images will be listed like this:
134134 </para>
135−<screen><![CDATA[
136−$ docker images
135+<screen>
136+<prompt>$ </prompt>docker images
137137REPOSITORY TAG IMAGE ID CREATED SIZE
138138hello latest 08c791c7846e 48 years ago 25.2MB
139−]]></screen>
139+</screen>
140140 <para>
141141 You can break binary reproducibility but have a sorted, meaningful <literal>CREATED</literal> column by setting <literal>created</literal> to <literal>now</literal>.
142142 </para>
@@ -152,11 +152,11 @@ pkgs.dockerTools.buildImage {
152152]]></programlisting>
153153 <para>
154154 and now the Docker CLI will display a reasonable date and sort the images as expected:
155−<screen><![CDATA[
156−$ docker images
155+<screen>
156+<prompt>$ </prompt>docker images
157157REPOSITORY TAG IMAGE ID CREATED SIZE
158158hello latest de2bf4786de6 About a minute ago 25.2MB
159−]]></screen>
159+</screen>
160160 however, the produced images will not be binary reproducible.
161161 </para>
162162 </example>
doc/builders/images/ocitools.xml+1−2
@@ -38,8 +38,7 @@ buildContainer {
3838
3939 readonly = false; <co xml:id='ex-ociTools-buildContainer-3' />
4040}
41−
42− </programlisting>
41+</programlisting>
4342 <calloutlist>
4443 <callout arearefs='ex-ociTools-buildContainer-1'>
4544 <para>
doc/builders/packages/citrix.xml+4−4
@@ -22,10 +22,10 @@
2222 </para>
2323 <para>
2424 In order to set this up, you first have to <link xlink:href="https://its.uiowa.edu/support/article/102186">download the <literal>.cr</literal> file from the Netscaler Gateway</link>. After that you can configure the <command>selfservice</command> like this:
25− <screen>
26− <prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
27− <prompt>$ </prompt>selfservice
28− </screen>
25+<screen>
26+<prompt>$ </prompt>storebrowse -C ~/Downloads/receiverconfig.cr
27+<prompt>$ </prompt>selfservice
28+</screen>
2929 </para>
3030 </section>
3131
doc/builders/packages/urxvt.xml+32−18
@@ -18,10 +18,13 @@
1818 includes all available plugins. To make use of this functionality, use an
1919 overlay or directly install an expression that overrides its configuration,
2020 such as
21− <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
21+<programlisting>
22+rxvt-unicode.override {
23+ configure = { availablePlugins, ... }: {
2224 plugins = with availablePlugins; [ perls resize-font vtwheel ];
23− }
24−}</programlisting>
25+ };
26+}
27+</programlisting>
2528 If the <literal>configure</literal> function returns an attrset without the
2629 <literal>plugins</literal> attribute, <literal>availablePlugins</literal>
2730 will be used automatically.
@@ -30,18 +33,22 @@
3033 <para>
3134 In order to add plugins but also keep all default plugins installed, it is
3235 possible to use the following method:
33− <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
34− plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
35− };
36−}</programlisting>
36+<programlisting>
37+rxvt-unicode.override {
38+ configure = { availablePlugins, ... }: {
39+ plugins = (builtins.attrValues availablePlugins) ++ [ custom-plugin ];
40+ };
41+}
42+</programlisting>
3743 </para>
3844
3945 <para>
4046 To get a list of all the plugins available, open the Nix REPL and run
41− <programlisting>$ nix repl
47+<screen>
48+<prompt>$ </prompt>nix repl
4249:l &lt;nixpkgs&gt;
4350map (p: p.name) pkgs.rxvt-unicode.plugins
44− </programlisting>
51+</screen>
4552 Alternatively, if your shell is bash or zsh and have completion enabled,
4653 simply type <literal>nixpkgs.rxvt-unicode.plugins.&lt;tab&gt;</literal>.
4754 </para>
@@ -53,18 +60,24 @@ map (p: p.name) pkgs.rxvt-unicode.plugins
5360 <literal>extraDeps</literal> can be used, for example, to provide
5461 <literal>xsel</literal> (a clipboard manager) to the clipboard plugin,
5562 without installing it globally:
56− <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
57− pluginsDeps = [ xsel ];
58− }
59−}</programlisting>
63+<programlisting>
64+rxvt-unicode.override {
65+ configure = { availablePlugins, ... }: {
66+ pluginsDeps = [ xsel ];
67+ };
68+}
69+</programlisting>
6070
6171 <literal>perlDeps</literal> is a handy way to provide Perl packages to
6272 your custom plugins (in <literal>$HOME/.urxvt/ext</literal>). For example,
6373 if you need <literal>AnyEvent</literal> you can do:
64− <programlisting>rxvt-unicode.override { configure = { availablePlugins, ... }: {
65− perlDeps = with perlPackages; [ AnyEvent ];
66− }
67−}</programlisting>
74+<programlisting>
75+rxvt-unicode.override {
76+ configure = { availablePlugins, ... }: {
77+ perlDeps = with perlPackages; [ AnyEvent ];
78+ };
79+}
80+</programlisting>
6881 </para>
6982
7083 </section>
@@ -90,7 +103,8 @@ map (p: p.name) pkgs.rxvt-unicode.plugins
90103 <para>
91104 If the plugin is itself a perl package that needs to be imported from
92105 other plugins or scripts, add the following passthrough:
93− <programlisting>passthru.perlPackages = [ "self" ];
106+<programlisting>
107+passthru.perlPackages = [ "self" ];
94108</programlisting>
95109 This will make the urxvt wrapper pick up the dependency and set up the perl
96110 path accordingly.
doc/contributing/submitting-changes.xml+6−6
@@ -209,12 +209,12 @@ Additional information.
209209 </para>
210210
211211<programlisting>
212− (fetchpatch {
213− name = "CVE-2019-11068.patch";
214− url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
215− sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
216− })
217− </programlisting>
212+(fetchpatch {
213+ name = "CVE-2019-11068.patch";
214+ url = "https://gitlab.gnome.org/GNOME/libxslt/commit/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch";
215+ sha256 = "0pkpb4837km15zgg6h57bncp66d5lwrlvkr73h0lanywq7zrwhj8";
216+})
217+</programlisting>
218218
219219 <para>
220220 If a security fix applies to both master and a stable release then, similar to regular changes, they are preferably delivered via master first and cherry-picked to the release branch.
doc/languages-frameworks/beam.xml+3−3
@@ -72,9 +72,9 @@
7272 To install any of those builders into your profile, refer to them by their attribute path <literal>beamPackages.rebar3</literal>:
7373 </para>
7474
75− <screen>
76− <prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.rebar3
77− </screen>
75+<screen>
76+<prompt>$ </prompt>nix-env -f &quot;&lt;nixpkgs&gt;&quot; -iA beamPackages.rebar3
77+</screen>
7878</section>
7979
8080 <section xml:id="packaging-beam-applications">
doc/languages-frameworks/perl.xml+99−99
@@ -8,28 +8,28 @@
88
99 <para>
1010 When executing a Perl script, it is possible you get an error such as <literal>./myscript.pl: bad interpreter: /usr/bin/perl: no such file or directory</literal>. This happens when the script expects Perl to be installed at <filename>/usr/bin/perl</filename>, which is not the case when using Perl from nixpkgs. You can fix the script by changing the first line to:
11− <programlisting>
12− #!/usr/bin/env perl
13− </programlisting>
11+<programlisting>
12+#!/usr/bin/env perl
13+</programlisting>
1414 to take the Perl installation from the <literal>PATH</literal> environment variable, or invoke Perl directly with:
15− <screen>
16− <prompt>$ </prompt>perl ./myscript.pl
17− </screen>
15+<screen>
16+<prompt>$ </prompt>perl ./myscript.pl
17+</screen>
1818 </para>
1919
2020 <para>
2121 When the script is using a Perl library that is not installed globally, you might get an error such as <literal>Can't locate DB_File.pm in @INC (you may need to install the DB_File module)</literal>. In that case, you can use <command>nix-shell</command> to start an ad-hoc shell with that library installed, for instance:
22− <screen>
23− <prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
24− </screen>
22+<screen>
23+<prompt>$ </prompt>nix-shell -p perl perlPackages.DBFile --run ./myscript.pl
24+</screen>
2525 </para>
2626
2727 <para>
2828 If you are always using the script in places where <command>nix-shell</command> is available, you can embed the <command>nix-shell</command> invocation in the shebang like this:
29− <programlisting>
30− #!/usr/bin/env nix-shell
31− #! nix-shell -i perl -p perl perlPackages.DBFile
32− </programlisting>
29+<programlisting>
30+#!/usr/bin/env nix-shell
31+#! nix-shell -i perl -p perl perlPackages.DBFile
32+</programlisting>
3333 </para>
3434 </section>
3535
@@ -44,30 +44,30 @@
4444 <para>
4545 Perl packages from CPAN are defined in <link
4646 xlink:href="https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/perl-packages.nix"><filename>pkgs/top-level/perl-packages.nix</filename></link>, rather than <filename>pkgs/all-packages.nix</filename>. Most Perl packages are so straight-forward to build that they are defined here directly, rather than having a separate function for each package called from <filename>perl-packages.nix</filename>. However, more complicated packages should be put in a separate file, typically in <filename>pkgs/development/perl-modules</filename>. Here is an example of the former:
47− <programlisting>
48− ClassC3 = buildPerlPackage rec {
49− name = "Class-C3-0.21";
50− src = fetchurl {
51− url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
52− sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
53− };
54− };
55− </programlisting>
47+<programlisting>
48+ClassC3 = buildPerlPackage rec {
49+ name = "Class-C3-0.21";
50+ src = fetchurl {
51+ url = "mirror://cpan/authors/id/F/FL/FLORA/${name}.tar.gz";
52+ sha256 = "1bl8z095y4js66pwxnm7s853pi9czala4sqc743fdlnk27kq94gz";
53+ };
54+};
55+</programlisting>
5656 Note the use of <literal>mirror://cpan/</literal>, and the <literal>${name}</literal> in the URL definition to ensure that the name attribute is consistent with the source that we’re actually downloading. Perl packages are made available in <filename>all-packages.nix</filename> through the variable <varname>perlPackages</varname>. For instance, if you have a package that needs <varname>ClassC3</varname>, you would typically write
57− <programlisting>
58− foo = import ../path/to/foo.nix {
59− inherit stdenv fetchurl ...;
60− inherit (perlPackages) ClassC3;
61− };
62− </programlisting>
57+<programlisting>
58+foo = import ../path/to/foo.nix {
59+ inherit stdenv fetchurl ...;
60+ inherit (perlPackages) ClassC3;
61+};
62+</programlisting>
6363 in <filename>all-packages.nix</filename>. You can test building a Perl package as follows:
64− <screen>
65− <prompt>$ </prompt>nix-build -A perlPackages.ClassC3
66− </screen>
64+<screen>
65+<prompt>$ </prompt>nix-build -A perlPackages.ClassC3
66+</screen>
6767 <varname>buildPerlPackage</varname> adds <literal>perl-</literal> to the start of the name attribute, so the package above is actually called <literal>perl-Class-C3-0.21</literal>. So to install it, you can say:
68− <screen>
69− <prompt>$ </prompt>nix-env -i perl-Class-C3
70− </screen>
68+<screen>
69+<prompt>$ </prompt>nix-env -i perl-Class-C3
70+</screen>
7171 (Of course you can also install using the attribute name: <literal>nix-env -i -A perlPackages.ClassC3</literal>.)
7272 </para>
7373
@@ -94,61 +94,61 @@
9494
9595 <para>
9696 <varname>buildPerlPackage</varname> is built on top of <varname>stdenv</varname>, so everything can be customised in the usual way. For instance, the <literal>BerkeleyDB</literal> module has a <varname>preConfigure</varname> hook to generate a configuration file used by <filename>Makefile.PL</filename>:
97− <programlisting>
98− { buildPerlPackage, fetchurl, db }:
99−
100− buildPerlPackage rec {
101− name = "BerkeleyDB-0.36";
102−
103− src = fetchurl {
104− url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
105− sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
106− };
107−
108− preConfigure = ''
109− echo "LIB = ${db.out}/lib" > config.in
110− echo "INCLUDE = ${db.dev}/include" >> config.in
111− '';
112− }
113− </programlisting>
97+<programlisting>
98+{ buildPerlPackage, fetchurl, db }:
99+
100+buildPerlPackage rec {
101+ name = "BerkeleyDB-0.36";
102+
103+ src = fetchurl {
104+ url = "mirror://cpan/authors/id/P/PM/PMQS/${name}.tar.gz";
105+ sha256 = "07xf50riarb60l1h6m2dqmql8q5dij619712fsgw7ach04d8g3z1";
106+ };
107+
108+ preConfigure = ''
109+ echo "LIB = ${db.out}/lib" > config.in
110+ echo "INCLUDE = ${db.dev}/include" >> config.in
111+ '';
112+}
113+</programlisting>
114114 </para>
115115
116116 <para>
117117 Dependencies on other Perl packages can be specified in the <varname>buildInputs</varname> and <varname>propagatedBuildInputs</varname> attributes. If something is exclusively a build-time dependency, use <varname>buildInputs</varname>; if it’s (also) a runtime dependency, use <varname>propagatedBuildInputs</varname>. For instance, this builds a Perl module that has runtime dependencies on a bunch of other modules:
118− <programlisting>
119− ClassC3Componentised = buildPerlPackage rec {
120− name = "Class-C3-Componentised-1.0004";
121− src = fetchurl {
122− url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
123− sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
124− };
125− propagatedBuildInputs = [
126− ClassC3 ClassInspector TestException MROCompat
127− ];
128− };
129− </programlisting>
118+<programlisting>
119+ClassC3Componentised = buildPerlPackage rec {
120+ name = "Class-C3-Componentised-1.0004";
121+ src = fetchurl {
122+ url = "mirror://cpan/authors/id/A/AS/ASH/${name}.tar.gz";
123+ sha256 = "0xql73jkcdbq4q9m0b0rnca6nrlvf5hyzy8is0crdk65bynvs8q1";
124+ };
125+ propagatedBuildInputs = [
126+ ClassC3 ClassInspector TestException MROCompat
127+ ];
128+};
129+</programlisting>
130130 </para>
131131
132132 <para>
133133 On Darwin, if a script has too many <literal>-I<replaceable>dir</replaceable></literal> flags in its first line (its “shebang line”), it will not run. This can be worked around by calling the <literal>shortenPerlShebang</literal> function from the <literal>postInstall</literal> phase:
134− <programlisting>
135− { stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
136−
137− ImageExifTool = buildPerlPackage {
138− pname = "Image-ExifTool";
139− version = "11.50";
140−
141− src = fetchurl {
142− url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
143− sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
144− };
145−
146− buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
147− postInstall = stdenv.lib.optional stdenv.isDarwin ''
148− shortenPerlShebang $out/bin/exiftool
149− '';
150− };
151− </programlisting>
134+<programlisting>
135+{ stdenv, buildPerlPackage, fetchurl, shortenPerlShebang }:
136+
137+ImageExifTool = buildPerlPackage {
138+ pname = "Image-ExifTool";
139+ version = "11.50";
140+
141+ src = fetchurl {
142+ url = "https://www.sno.phy.queensu.ca/~phil/exiftool/Image-ExifTool-11.50.tar.gz";
143+ sha256 = "0d8v48y94z8maxkmw1rv7v9m0jg2dc8xbp581njb6yhr7abwqdv3";
144+ };
145+
146+ buildInputs = stdenv.lib.optional stdenv.isDarwin shortenPerlShebang;
147+ postInstall = stdenv.lib.optional stdenv.isDarwin ''
148+ shortenPerlShebang $out/bin/exiftool
149+ '';
150+};
151+</programlisting>
152152 This will remove the <literal>-I</literal> flags from the shebang line, rewrite them in the <literal>use lib</literal> form, and put them on the next line instead. This function can be given any number of Perl scripts as arguments; it will modify them in-place.
153153 </para>
154154
@@ -159,27 +159,27 @@
159159 Nix expressions for Perl packages can be generated (almost) automatically from CPAN. This is done by the program <command>nix-generate-from-cpan</command>, which can be installed as follows:
160160 </para>
161161
162− <screen>
163− <prompt>$ </prompt>nix-env -i nix-generate-from-cpan
164− </screen>
162+<screen>
163+<prompt>$ </prompt>nix-env -i nix-generate-from-cpan
164+</screen>
165165
166166 <para>
167167 This program takes a Perl module name, looks it up on CPAN, fetches and unpacks the corresponding package, and prints a Nix expression on standard output. For example:
168− <screen>
169− <prompt>$ </prompt>nix-generate-from-cpan XML::Simple
170− XMLSimple = buildPerlPackage rec {
171− name = "XML-Simple-2.22";
172− src = fetchurl {
173− url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
174− sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
175− };
176− propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
177− meta = {
178− description = "An API for simple XML files";
179− license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
180− };
181− };
182− </screen>
168+<screen>
169+<prompt>$ </prompt>nix-generate-from-cpan XML::Simple
170+ XMLSimple = buildPerlPackage rec {
171+ name = "XML-Simple-2.22";
172+ src = fetchurl {
173+ url = "mirror://cpan/authors/id/G/GR/GRANTM/${name}.tar.gz";
174+ sha256 = "b9450ef22ea9644ae5d6ada086dc4300fa105be050a2030ebd4efd28c198eb49";
175+ };
176+ propagatedBuildInputs = [ XMLNamespaceSupport XMLSAX XMLSAXExpat ];
177+ meta = {
178+ description = "An API for simple XML files";
179+ license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ];
180+ };
181+ };
182+</screen>
183183 The output can be pasted into <filename>pkgs/top-level/perl-packages.nix</filename> or wherever else you need it.
184184 </para>
185185 </section>
doc/languages-frameworks/qt.xml+1−1
@@ -18,7 +18,7 @@ mkDerivation { <co xml:id='qt-default-nix-co-2' />
1818
1919 buildInputs = [ qtbase ]; <co xml:id='qt-default-nix-co-3' />
2020}
21− </programlisting>
21+</programlisting>
2222 </example>
2323
2424 <calloutlist>
doc/languages-frameworks/ruby.xml+12−13
@@ -12,14 +12,14 @@
1212 </para>
1313
1414<screen>
15−<![CDATA[$ cd pkgs/servers/monitoring
16−$ mkdir sensu
17−$ cd sensu
18−$ cat > Gemfile
15+<prompt>$ </prompt>cd pkgs/servers/monitoring
16+<prompt>$ </prompt>mkdir sensu
17+<prompt>$ </prompt>cd sensu
18+<prompt>$ </prompt>cat > Gemfile
1919source 'https://rubygems.org'
2020gem 'sensu'
21−$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
22−$ cat > default.nix
21+<prompt>$ </prompt>$(nix-build '&lt;nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
22+<prompt>$ </prompt>cat > default.nix
2323{ lib, bundlerEnv, ruby }:
2424
2525bundlerEnv rec {
@@ -37,7 +37,7 @@ bundlerEnv rec {
3737 maintainers = with maintainers; [ theuni ];
3838 platforms = platforms.unix;
3939 };
40−}]]>
40+}
4141</screen>
4242
4343 <para>
@@ -49,17 +49,16 @@ bundlerEnv rec {
4949 </para>
5050
5151<screen>
52−<![CDATA[$ cd pkgs/servers/monitoring/sensu
53−$ nix-shell -p bundler --run 'bundle lock --update'
54−$ nix-shell -p bundix --run 'bundix'
55−]]>
52+<prompt>$ </prompt>cd pkgs/servers/monitoring/sensu
53+<prompt>$ </prompt>nix-shell -p bundler --run 'bundle lock --update'
54+<prompt>$ </prompt>nix-shell -p bundix --run 'bundix'
5655</screen>
5756
5857 <para>
5958 For tools written in Ruby - i.e. where the desire is to install a package and then execute e.g. <command>rake</command> at the command line, there is an alternative builder called <literal>bundlerApp</literal>. Set up the <filename>gemset.nix</filename> the same way, and then, for example:
6059 </para>
6160
62−<screen>
61+<programlisting>
6362<![CDATA[{ lib, bundlerApp }:
6463
6564bundlerApp {
@@ -75,7 +74,7 @@ bundlerApp {
7574 platforms = platforms.unix;
7675 };
7776}]]>
78−</screen>
77+</programlisting>
7978
8079 <para>
8180 The chief advantage of <literal>bundlerApp</literal> over <literal>bundlerEnv</literal> is the executables introduced in the environment are precisely those selected in the <literal>exes</literal> list, as opposed to <literal>bundlerEnv</literal> which adds all the executables made available by gems in the gemset, which can mean e.g. <command>rspec</command> or <command>rake</command> in unpredictable versions available from various packages.
doc/languages-frameworks/texlive.xml+5−5
@@ -44,11 +44,11 @@ texlive.combine {
4444 <listitem>
4545 <para>
4646 You can list packages e.g. by <command>nix repl</command>.
47−<programlisting><![CDATA[
48−$ nix repl
49−nix-repl> :l <nixpkgs>
50−nix-repl> texlive.collection-<TAB>
51−]]></programlisting>
47+<programlisting>
48+<prompt>$ </prompt>nix repl
49+<prompt>nix-repl> </prompt>:l &lt;nixpkgs>
50+<prompt>nix-repl> </prompt>texlive.collection-<keycap function="tab" />
51+</programlisting>
5252 </para>
5353 </listitem>
5454 <listitem>
doc/stdenv/multiple-output.xml+1−1
@@ -67,7 +67,7 @@
6767 <para>
6868 <command>nix-env</command> silenty disregards the outputs selected by the user, and instead installs the outputs from <varname>meta.outputsToInstall</varname>. For example,
6969 </para>
70−<programlisting>$ nix-env -iA nixpkgs.coreutils.info</programlisting>
70+<screen><prompt>$ </prompt>nix-env -iA nixpkgs.coreutils.info</screen>
7171 <para>
7272 installs the <literal>"out"</literal> output (<varname>coreutils.meta.outputsToInstall</varname> is <literal>[ "out" ]</literal>) instead of the requested <literal>"info"</literal>.
7373 </para>
doc/using/configuration.xml+4−4
@@ -66,7 +66,7 @@
6666 <listitem>
6767 <para>
6868 For allowing the build of a broken package once, you can use an environment variable for a single invocation of the nix tools:
69−<programlisting>$ export NIXPKGS_ALLOW_BROKEN=1</programlisting>
69+<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_BROKEN=1</screen>
7070 </para>
7171 </listitem>
7272 <listitem>
@@ -92,7 +92,7 @@
9292 <listitem>
9393 <para>
9494 For allowing the build of an unsupported package once, you can use an environment variable for a single invocation of the nix tools:
95−<programlisting>$ export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1</programlisting>
95+<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1</screen>
9696 </para>
9797 </listitem>
9898 <listitem>
@@ -122,7 +122,7 @@
122122 <listitem>
123123 <para>
124124 To temporarily allow all unfree packages, you can use an environment variable for a single invocation of the nix tools:
125−<programlisting>$ export NIXPKGS_ALLOW_UNFREE=1</programlisting>
125+<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_UNFREE=1</screen>
126126 </para>
127127 </listitem>
128128 <listitem>
@@ -187,7 +187,7 @@
187187 <listitem>
188188 <para>
189189 To temporarily allow all insecure packages, you can use an environment variable for a single invocation of the nix tools:
190−<programlisting>$ export NIXPKGS_ALLOW_INSECURE=1</programlisting>
190+<screen><prompt>$ </prompt>export NIXPKGS_ALLOW_INSECURE=1</screen>
191191 </para>
192192 </listitem>
193193 <listitem>
doc/using/overlays.xml+5−5
@@ -240,7 +240,7 @@ self: super:
240240 lapackProvider = self.mkl;
241241 }
242242}
243− </programlisting>
243+</programlisting>
244244 <para>
245245 This overlay uses Intel’s MKL library for both BLAS and LAPACK
246246 interfaces. Note that the same can be accomplished at runtime
@@ -248,9 +248,9 @@ self: super:
248248 <literal>libblas.so.3</literal> and
249249 <literal>liblapack.so.3</literal>. For instance:
250250 </para>
251− <programlisting>
252−$ LD_LIBRARY_PATH=$(nix-build -A mkl)/lib:$LD_LIBRARY_PATH nix-shell -p octave --run octave
253− </programlisting>
251+<screen>
252+<prompt>$ </prompt>LD_LIBRARY_PATH=$(nix-build -A mkl)/lib:$LD_LIBRARY_PATH nix-shell -p octave --run octave
253+</screen>
254254 <para>
255255 Intel MKL requires an <literal>openmp</literal> implementation
256256 when running with multiple processors. By default,
@@ -288,7 +288,7 @@ assert (!blas.isILP64) &amp;&amp; (!lapack.isILP64);
288288stdenv.mkDerivation {
289289 ...
290290}
291− </programlisting>
291+</programlisting>
292292 </section>
293293 </section>
294294</chapter>