How do you add files to this build? For example, if I have this program.rb that depends on ruby:
puts “Hello World”
let pkgs = import <nixpkgs> {}; in pkgs.runCommand "my-app" { buildInputs = [pkgs.ruby]; } '' pwd && ls; ruby ./program.rb ''
let pkgs = import <nixpkgs> {}; in pkgs.runCommand "my-app" { buildInputs = [pkgs.ruby]; } '' pwd && ls ruby ${./program.rb} ''
let pkgs = import <nixpkgs> {}; in pkgs.runCommand "my-app" { buildInputs = [pkgs.ruby]; program = ./program.rb; } '' pwd && ls; ruby "$program" ''
If you want to write to nix store with stdenv use $out.
How do you add files to this build? For example, if I have this program.rb that depends on ruby:
And then you add a file called package.nix How do you get your files in there - like “ADD” in a Dockerfile?