aboutsummaryrefslogtreecommitdiff
path: root/doc/manual/command-ref/nix-shell.xml
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-09-19 13:01:27 -0400
committerGraham Christensen <graham@grahamc.com>2018-09-19 13:01:27 -0400
commitbe9e356e614a95e7ab839584c9d95838be1d0002 (patch)
treea98acae0d3b0662a1e4acf3482590f0e09e58d0d /doc/manual/command-ref/nix-shell.xml
parent10a7f199372c4bca5d81030e8a39ca7537ea47ca (diff)
nix-shell: document double quotes being necessary for a simple Nix expression in the shebang
Diffstat (limited to 'doc/manual/command-ref/nix-shell.xml')
-rw-r--r--doc/manual/command-ref/nix-shell.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/manual/command-ref/nix-shell.xml b/doc/manual/command-ref/nix-shell.xml
index 3f12dda04..cb443c888 100644
--- a/doc/manual/command-ref/nix-shell.xml
+++ b/doc/manual/command-ref/nix-shell.xml
@@ -317,6 +317,20 @@ while (my $token = $p->get_tag("a")) {
</para>
+<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):