ruby docs: improve example
1. Call `nix-build` with `--no-out-link` to avoid cluttering the source dir. 2. Re-add `patchShebangs`, since `buildCommand` doesn't imply a patch phase. (It was my fault to remove this in the first place, sorry!)
This commit is contained in:
parent
9ca7f38ce9
commit
865765aece
@ -20,7 +20,7 @@ $ cd sensu
|
|||||||
$ cat > Gemfile
|
$ cat > Gemfile
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
gem 'sensu'
|
gem 'sensu'
|
||||||
$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix --magic
|
$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
|
||||||
$ cat > default.nix
|
$ cat > default.nix
|
||||||
{ lib, bundlerEnv, ruby }:
|
{ lib, bundlerEnv, ruby }:
|
||||||
|
|
||||||
@ -114,6 +114,7 @@ in stdenv.mkDerivation {
|
|||||||
script = ./my-script.rb;
|
script = ./my-script.rb;
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
install -D -m755 $script $out/bin/my-script
|
install -D -m755 $script $out/bin/my-script
|
||||||
|
patchShebangs $out/bin/my-script
|
||||||
'';
|
'';
|
||||||
}]]>
|
}]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
Loading…
Reference in New Issue
Block a user