Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 44 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.0"; 10 11 src = fetchFromGitHub { 12 owner = "nix-community"; 13 repo = "bundix"; 14 rev = version; 15 sha256 = "05y8sy6v9km1dwvpjzkjxpfzv95g6yzac1b5blac2f1r2kw167p8"; 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 inherit version; 32 description = "Creates Nix packages from Gemfiles"; 33 longDescription = '' 34 This is a tool that converts Gemfile.lock files to nix expressions. 35 36 The output is then usable by the bundlerEnv derivation to list all the 37 dependencies of a ruby package. 38 ''; 39 homepage = https://github.com/manveru/bundix; 40 license = "MIT"; 41 maintainers = with lib.maintainers; [ manveru qyliss zimbatm ]; 42 platforms = lib.platforms.all; 43 }; 44}