mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
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
|
||||
source 'https://rubygems.org'
|
||||
gem 'sensu'
|
||||
$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix --magic
|
||||
$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
|
||||
$ cat > default.nix
|
||||
{ lib, bundlerEnv, ruby }:
|
||||
|
||||
@ -114,6 +114,7 @@ in stdenv.mkDerivation {
|
||||
script = ./my-script.rb;
|
||||
buildCommand = ''
|
||||
install -D -m755 $script $out/bin/my-script
|
||||
patchShebangs $out/bin/my-script
|
||||
'';
|
||||
}]]>
|
||||
</programlisting>
|
||||
|
Loading…
Reference in New Issue
Block a user