Skip to content

Instantly share code, notes, and snippets.

@manveru
Created January 12, 2016 21:08
Show Gist options
  • Save manveru/f782ed4f1958e24720c8 to your computer and use it in GitHub Desktop.
Save manveru/f782ed4f1958e24720c8 to your computer and use it in GitHub Desktop.
{
packageOverrides = pkgs:
let
bundlerGem = { buildRubyGem, makeWrapper, ruby, coreutils }:
buildRubyGem {
name = "bundler-1.9.10";
namePrefix = "";
sha256 = "0ygpfvk51x96a8r3jknx7vf6afabxqp8byayvkka3rqkwv0jssqs";
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
'';
};
in
rec {
bundlerEnv = pkgs.bundlerEnv.override {
bundler_HEAD = bundlerGem {
buildRubyGem = pkgs.buildRubyGem;
makeWrapper = pkgs.makeWrapper;
ruby = pkgs.ruby;
coreutils = pkgs.coreutils;
};
};
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment