about summary refs log tree commit diff
path: root/pkgs/development/ruby-modules
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2016-09-02 16:00:45 -0400
committerGitHub <noreply@github.com>2016-09-02 16:00:45 -0400
commitadd3d4d45b853230ac890bd5c8411cac072bfcee (patch)
tree4d2cefb8a9b0a2a1960eb9ddc34970e74dbd73d0 /pkgs/development/ruby-modules
parentce3daae51a8c0ef38b0c59a4e672ccdd7b1e7e58 (diff)
downloadnixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar.gz
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar.bz2
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar.lz
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar.xz
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.tar.zst
nixlib-add3d4d45b853230ac890bd5c8411cac072bfcee.zip
Revert "bundix: 2.2.0"
Diffstat (limited to 'pkgs/development/ruby-modules')
-rw-r--r--pkgs/development/ruby-modules/bundix/default.nix45
1 files changed, 26 insertions, 19 deletions
diff --git a/pkgs/development/ruby-modules/bundix/default.nix b/pkgs/development/ruby-modules/bundix/default.nix
index 8a1207269d28..378f148ca6ac 100644
--- a/pkgs/development/ruby-modules/bundix/default.nix
+++ b/pkgs/development/ruby-modules/bundix/default.nix
@@ -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;