git.iko.soy/typeable/nixpkgs
on master help sign in
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!)

commit865765aece83690d673f2db2533300eb36fdb6b8 authornonsequitur <cornelius.mika@gmail.com> dateMon 14 Aug 2017, 10:10 (9 years ago) parent9ca7f38
1 file changed+2−1
doc/languages-frameworks/ruby.xml+2−1
doc/languages-frameworks/ruby.xml+2−1
@@ -20,7 +20,7 @@ $ cd sensu
2020$ cat > Gemfile
2121source 'https://rubygems.org'
2222gem 'sensu'
23−$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix --magic
23+$ $(nix-build '<nixpkgs>' -A bundix --no-out-link)/bin/bundix --magic
2424$ cat > default.nix
2525{ lib, bundlerEnv, ruby }:
2626
@@ -114,6 +114,7 @@ in stdenv.mkDerivation {
114114 script = ./my-script.rb;
115115 buildCommand = ''
116116 install -D -m755 $script $out/bin/my-script
117+ patchShebangs $out/bin/my-script
117118 '';
118119}]]>
119120</programlisting>