diff options
author | Brian McKenna <brian@brianmckenna.org> | 2015-12-07T00·31+1100 |
---|---|---|
committer | Brian McKenna <brian@brianmckenna.org> | 2015-12-07T00·31+1100 |
commit | 9018deab6c4242e3747f6b0831cc59c9dddaed99 (patch) | |
tree | 29cc2eb1500559c0beb5a27a64b007fcca51792a | |
parent | d1e3bf01bce7d8502610532077f6f55c3df4de2c (diff) |
Use shellwords for nix-shell shebang
Previously we can't have quoted arguments. This now allows us to use things like `ghcWithPackages`
-rwxr-xr-x | scripts/nix-build.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/nix-build.in b/scripts/nix-build.in index 0a4431681cb1..ea099532b7cb 100755 --- a/scripts/nix-build.in +++ b/scripts/nix-build.in @@ -6,6 +6,7 @@ use Nix::Config; use Nix::Store; use Nix::Utils; use File::Basename; +use Text::ParseWords; use Cwd; binmode STDERR, ":encoding(utf8)"; @@ -56,7 +57,7 @@ if ($runEnv && defined $ARGV[0] && $ARGV[0] !~ /nix-shell/) { while (<SCRIPT>) { chomp; if (/^\#\!\s*nix-shell (.*)$/) { - push @ARGV, split(/ /, $1); + push @ARGV, shellwords(/ /, $1); } } } |