Files
nixpkgs/pkgs/development/ruby-modules/bundix/default.nix
T

45 lines
1.3 KiB
Nix
Raw Normal View History

2017-07-10 16:40:26 +10:00
{ buildRubyGem, fetchFromGitHub, makeWrapper, lib, bundler, nix,
2017-07-06 11:45:30 +02:00
nix-prefetch-git }:
2015-01-20 01:07:55 -05:00
2016-02-09 23:47:41 +01:00
buildRubyGem rec {
2017-07-10 16:40:26 +10:00
inherit (bundler) 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-07-06 11:45:30 +02:00
version = "2.3.1";
2016-02-09 23:47:41 +01:00
2017-06-09 22:37:36 +01:00
src = fetchFromGitHub {
owner = "manveru";
repo = "bundix";
rev = version;
2017-07-06 11:45:30 +02:00
sha256 = "0ap23abv6chiv7v97ic6b1qf5by6b26as5yrpxg5q7p2giyiv33v";
2017-06-09 22:37:36 +01:00
};
2016-02-09 23:47:41 +01:00
2017-07-06 11:45:30 +02:00
buildInputs = [ ruby bundler ];
nativeBuildInputs = [ makeWrapper ];
2016-02-09 23:47:41 +01:00
2017-07-06 11:45:30 +02:00
preFixup = ''
wrapProgram $out/bin/bundix \
--prefix PATH : "${nix.out}/bin" \
--prefix PATH : "${nix-prefetch-git.out}/bin" \
--prefix PATH : "${bundler.out}/bin" \
--set GEM_HOME "${bundler}/${bundler.ruby.gemPath}" \
--set GEM_PATH "${bundler}/${bundler.ruby.gemPath}"
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;
2016-02-09 23:47:41 +01:00
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
}