1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 23:12:44 +01:00

nix-shell: document double quotes being necessary for a simple Nix expression in the shebang

(cherry picked from commit be9e356e61)
This commit is contained in:
Graham Christensen 2018-09-19 13:01:27 -04:00 committed by Eelco Dolstra
parent cae9262a6c
commit 74b612e70a
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -317,6 +317,20 @@ while (my $token = $p->get_tag("a")) {
</para> </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 <para>Finally, using the merging of multiple nix-shell shebangs the
following Haskell script uses a specific branch of Nixpkgs/NixOS (the following Haskell script uses a specific branch of Nixpkgs/NixOS (the
18.03 stable branch): 18.03 stable branch):