Skip to content

Commit

Permalink
Merge pull request #18229 from NixOS/revert-18145-bundix
Browse files Browse the repository at this point in the history
Revert "bundix: 2.2.0"
  • Loading branch information
grahamc authored Sep 2, 2016
2 parents ce3daae + add3d4d commit 09f8c51
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions pkgs/development/ruby-modules/bundix/default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{ lib, stdenv, fetchFromGitHub, nix, nix-prefetch-git, bundler, makeWrapper }:
stdenv.mkDerivation rec {
version = "2.2.0";
name = "bundix-${version}";
{ buildRubyGem, lib, bundler, ruby, nix, nix-prefetch-git }:

src = fetchFromGitHub {
owner = "manveru";
repo = "bundix";
rev = version;
sha256 = "0lnzkwxprdz73axk54y5p5xkw56n3lra9v2dsvqjfw0ab66ld0iy";
};
phases = "installPhase";
installPhase = ''
mkdir -p $out
makeWrapper $src/bin/bundix $out/bin/bundix \
--prefix PATH : "${nix.out}/bin" \
--prefix PATH : "${nix-prefetch-git.out}/bin" \
--set GEM_PATH "${bundler}/${bundler.ruby.gemPath}"
'';
buildRubyGem rec {
inherit ruby;

name = "${gemName}-${version}";
gemName = "bundix";
version = "2.0.8";

nativeBuildInputs = [makeWrapper];
sha256 = "0ikpf2g01izadjpdnc4k2rb9v4g11f1jk2y5alxc7n7rxjkwdc66";

buildInputs = [bundler];

postInstall = ''
substituteInPlace $GEM_HOME/gems/${gemName}-${version}/lib/bundix.rb \
--replace \
"'nix-instantiate'" \
"'${nix.out}/bin/nix-instantiate'" \
--replace \
"'nix-hash'" \
"'${nix.out}/bin/nix-hash'" \
--replace \
"'nix-prefetch-url'" \
"'${nix.out}/bin/nix-prefetch-url'" \
--replace \
"'nix-prefetch-git'" \
"'${nix-prefetch-git}/bin/nix-prefetch-git'"
'';

meta = {
inherit version;
Expand Down

0 comments on commit 09f8c51

Please sign in to comment.