diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-01-08T13·56+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-01-08T13·56+0100 |
commit | b76589206a1303fb2dca073f6ec01bc71fc0fab2 (patch) | |
tree | 5918f131648a8fd28c1a1eaa6ad8f954ff09da67 /src | |
parent | a957893b261a4438101c205e38fe8ce62b83a121 (diff) |
nix-shell: Interpret filenames relative to the #!-script
So you can have a script like: #! /usr/bin/env nix-shell #! nix-shell script.nix -i python import prettytable x = prettytable.PrettyTable(["Foo", "Bar"]) for i in range(1, 10): x.add_row([i, i**2]) print x with a ‘script.nix’ in the same directory: with import <nixpkgs> {}; runCommand "dummy" { buildInputs = [ python pythonPackages.prettytable ]; } "" (Of course, in this particular case, using the ‘-p’ flag is more convenient.)
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions