about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-09-19T18·08+0200
committerGitHub <noreply@github.com>2018-09-19T18·08+0200
commit43b7eebfabe9bf1b0680391c0a311676c4cdb2b9 (patch)
treea98acae0d3b0662a1e4acf3482590f0e09e58d0d /doc
parent2ca6ef0fec150209994814fada3533fbd0f9f764 (diff)
parentbe9e356e614a95e7ab839584c9d95838be1d0002 (diff)
Merge pull request #2433 from grahamc/doc-shebang-quotes
Document that nix-shell's shebang requires double quotes for expressions
Diffstat (limited to 'doc')
-rw-r--r--doc/manual/command-ref/nix-shell.xml21
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/manual/command-ref/nix-shell.xml b/doc/manual/command-ref/nix-shell.xml
index 5c44c4a8f446..cb443c888d3d 100644
--- a/doc/manual/command-ref/nix-shell.xml
+++ b/doc/manual/command-ref/nix-shell.xml
@@ -317,13 +317,28 @@ while (my $token = $p->get_tag("a")) {
 
 </para>
 
-<para>Finally, the following Haskell script uses a specific branch of
-Nixpkgs/NixOS (the 14.12 stable branch):
+<para>Sometimes you need to pass a simple Nix expression to customize
+a package like Terraform:
+
+<programlisting><![CDATA[
+#! /usr/bin/env nix-shell
+#! nix-shell -i bash -p "terraform.withPlugins (plugins: [ plugins.openstack ])"
+
+terraform apply
+]]></programlisting>
+
+<note><para>You must use double quotes (<literal>"</literal>) when
+passing a simple Nix expression in a nix-shell shebang.</para></note>
+</para>
+
+<para>Finally, using the merging of multiple nix-shell shebangs the
+following Haskell script uses a specific branch of Nixpkgs/NixOS (the
+18.03 stable branch):
 
 <programlisting><![CDATA[
 #! /usr/bin/env nix-shell
 #! nix-shell -i runghc -p haskellPackages.ghc haskellPackages.HTTP haskellPackages.tagsoup
-#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-14.12.tar.gz
+#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-18.03.tar.gz
 
 import Network.HTTP
 import Text.HTML.TagSoup