git.iko.soy/typeable/nixpkgs
on master help sign in
shell functions: rewrite as xml
commitc3125498fd7d0398f50e2b53a9e274b7c1e2db67 authorGraham Christensen <graham@grahamc.com> dateTue 2 Oct 2018, 14:16 (8 years ago) parent507a63c
3 files changed+28−23
doc/functions.xml+1−1 doc/functions/shell.section.md−22 doc/functions/shell.xml+27
doc/functions.xml+1−1
@@ -12,6 +12,6 @@
1212 <xi:include href="functions/generators.xml" />
1313 <xi:include href="functions/debug.xml" />
1414 <xi:include href="functions/fhs-environments.xml" />
15− <xi:include href="functions/shell.section.xml" />
15+ <xi:include href="functions/shell.xml" />
1616 <xi:include href="functions/dockertools.xml" />
1717</chapter>
doc/functions/shell.section.mddeleted−22
@@ -1,22 +0,0 @@
1−---
2−title: pkgs.mkShell
3−author: zimbatm
4−date: 2017-10-30
5−---
6−
7−# mkShell
8−
9−pkgs.mkShell is a special kind of derivation that is only useful when using
10−it combined with nix-shell. It will in fact fail to instantiate when invoked
11−with nix-build.
12−
13−## Usage
14−
15−```nix
16−{ pkgs ? import <nixpkgs> {} }:
17−pkgs.mkShell {
18− # this will make all the build inputs from hello and gnutar available to the shell environment
19− inputsFrom = with pkgs; [ hello gnutar ];
20− buildInputs = [ pkgs.gnumake ];
21−}
22−```
doc/functions/shell.xmlnew file+27
@@ -0,0 +1,27 @@
1+<section xmlns="http://docbook.org/ns/docbook"
2+ xmlns:xlink="http://www.w3.org/1999/xlink"
3+ xmlns:xi="http://www.w3.org/2001/XInclude"
4+ xml:id="sec-pkgs-mkShell">
5+ <title>pkgs.mkShell</title>
6+
7+ <para>
8+ <function>pkgs.mkShell</function> is a special kind of derivation
9+ that is only useful when using it combined with
10+ <command>nix-shell</command>. It will in fact fail to instantiate
11+ when invoked with <command>nix-build</command>.
12+ </para>
13+
14+ <section xml:id="sec-pkgs-mkShell-usage">
15+ <title>Usage</title>
16+
17+ <programlisting><![CDATA[
18+{ pkgs ? import <nixpkgs> {} }:
19+pkgs.mkShell {
20+ # this will make all the build inputs from hello and gnutar
21+ # available to the shell environment
22+ inputsFrom = with pkgs; [ hello gnutar ];
23+ buildInputs = [ pkgs.gnumake ];
24+}
25+]]></programlisting>
26+ </section>
27+</section>