nixpkgs-suyu/pkgs/development/interpreters/ruby/bundler.nix
Vladimír Čunát 8f33b8cc93 mass rewrite of find parameters to cross-platform style
Fixes #9044, close #9667. Thanks to @taku0 for suggesting this solution.
Now we have no modes starting with `/` or `+`.

Rewrite the `-perm` parameters of find:
 - completely safe: rewrite `/0100` and `+100` to `-0100`,
 - slightly semantics-changing: rewrite `+111` to `-0100`.
I cross-verified the `find` manual pages for Linux, Darwin, FreeBSD.
2015-09-06 10:26:30 +02:00

17 lines
452 B
Nix

{ buildRubyGem, makeWrapper, ruby, coreutils }:
buildRubyGem {
name = "bundler-1.10.5";
namePrefix = "";
sha256 = "1zkxw6699bbmsamrij2lirscbh0j58p1p3bql22jsxvx34j6w5nc";
dontPatchShebangs = true;
postInstall = ''
find $out -type f -perm -0100 | while read f; do
substituteInPlace $f \
--replace "/usr/bin/env" "${coreutils}/bin/env"
done
wrapProgram $out/bin/bundler \
--prefix PATH ":" ${ruby}/bin
'';
}