3 ms·
You can splice file paths directly into the script, like this: let pkgs = import <nixpkgs> {}; in pkgs.runCommand "my-app" { buildInputs
by chriswarbo 6y ago
You can splice file paths directly into the script, like this:
let pkgs = import <nixpkgs> {}; in
pkgs.runCommand "my-app"
{
buildInputs = [pkgs.ruby];
}
''
pwd && ls
ruby ${./program.rb}
''
Or you could add it as an env var:
let pkgs = import <nixpkgs> {}; in
pkgs.runCommand "my-app"
{
buildInputs = [pkgs.ruby];
program = ./program.rb;
}
''
pwd && ls;
ruby "$program"
''