at 22.05-pre 43 lines 1.3 kB view raw
1{ buildRubyGem, fetchFromGitHub, makeWrapper, lib, bundler, nix, 2 nix-prefetch-git }: 3 4buildRubyGem rec { 5 inherit (bundler) ruby; 6 7 name = "${gemName}-${version}"; 8 gemName = "bundix"; 9 version = "2.5.1"; 10 11 src = fetchFromGitHub { 12 owner = "nix-community"; 13 repo = "bundix"; 14 rev = version; 15 sha256 = "sha256-iMp6Yj7TSWDqge3Lw855/igOWdTIuFH1LGeIN/cpq7U="; 16 }; 17 18 buildInputs = [ ruby bundler ]; 19 nativeBuildInputs = [ makeWrapper ]; 20 21 preFixup = '' 22 wrapProgram $out/bin/bundix \ 23 --prefix PATH : "${nix.out}/bin" \ 24 --prefix PATH : "${nix-prefetch-git.out}/bin" \ 25 --prefix PATH : "${bundler.out}/bin" \ 26 --set GEM_HOME "${bundler}/${bundler.ruby.gemPath}" \ 27 --set GEM_PATH "${bundler}/${bundler.ruby.gemPath}" 28 ''; 29 30 meta = { 31 description = "Creates Nix packages from Gemfiles"; 32 longDescription = '' 33 This is a tool that converts Gemfile.lock files to nix expressions. 34 35 The output is then usable by the bundlerEnv derivation to list all the 36 dependencies of a ruby package. 37 ''; 38 homepage = "https://github.com/manveru/bundix"; 39 license = "MIT"; 40 maintainers = with lib.maintainers; [ manveru marsam zimbatm ]; 41 platforms = lib.platforms.all; 42 }; 43}