2017-06-09 22:37:36 +01:00
|
|
|
{ buildRubyGem, fetchFromGitHub, lib, bundler, ruby, nix, nix-prefetch-git }:
|
2015-01-20 01:07:55 -05:00
|
|
|
|
2016-02-09 23:47:41 +01:00
|
|
|
buildRubyGem rec {
|
|
|
|
|
inherit ruby;
|
2015-11-14 21:17:29 -05:00
|
|
|
|
2016-02-09 23:47:41 +01:00
|
|
|
name = "${gemName}-${version}";
|
2015-11-14 21:17:29 -05:00
|
|
|
gemName = "bundix";
|
2017-06-09 22:37:36 +01:00
|
|
|
version = "2.2.0";
|
2016-02-09 23:47:41 +01:00
|
|
|
|
2017-06-09 22:37:36 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "manveru";
|
|
|
|
|
repo = "bundix";
|
|
|
|
|
rev = version;
|
|
|
|
|
sha256 = "0lnzkwxprdz73axk54y5p5xkw56n3lra9v2dsvqjfw0ab66ld0iy";
|
|
|
|
|
};
|
2016-02-09 23:47:41 +01:00
|
|
|
|
|
|
|
|
buildInputs = [bundler];
|
|
|
|
|
|
|
|
|
|
postInstall = ''
|
2016-02-14 16:58:51 +00:00
|
|
|
substituteInPlace $GEM_HOME/gems/${gemName}-${version}/lib/bundix.rb \
|
|
|
|
|
--replace \
|
|
|
|
|
"'nix-instantiate'" \
|
2016-04-18 20:06:50 +02:00
|
|
|
"'${nix.out}/bin/nix-instantiate'" \
|
2016-02-14 16:58:51 +00:00
|
|
|
--replace \
|
|
|
|
|
"'nix-hash'" \
|
2016-04-18 20:06:50 +02:00
|
|
|
"'${nix.out}/bin/nix-hash'" \
|
2016-02-14 16:58:51 +00:00
|
|
|
--replace \
|
|
|
|
|
"'nix-prefetch-url'" \
|
2016-04-18 20:06:50 +02:00
|
|
|
"'${nix.out}/bin/nix-prefetch-url'" \
|
2016-02-14 16:58:51 +00:00
|
|
|
--replace \
|
|
|
|
|
"'nix-prefetch-git'" \
|
|
|
|
|
"'${nix-prefetch-git}/bin/nix-prefetch-git'"
|
2016-02-09 23:47:41 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
|
inherit version;
|
|
|
|
|
description = "Creates Nix packages from Gemfiles";
|
|
|
|
|
longDescription = ''
|
|
|
|
|
This is a tool that converts Gemfile.lock files to nix expressions.
|
|
|
|
|
|
|
|
|
|
The output is then usable by the bundlerEnv derivation to list all the
|
|
|
|
|
dependencies of a ruby package.
|
|
|
|
|
'';
|
|
|
|
|
homepage = "https://github.com/manveru/bundix";
|
|
|
|
|
license = "MIT";
|
|
|
|
|
maintainers = with lib.maintainers; [ manveru zimbatm ];
|
|
|
|
|
platforms = lib.platforms.all;
|
2015-11-14 21:17:29 -05:00
|
|
|
};
|
2015-01-20 01:07:55 -05:00
|
|
|
}
|