nixpkgs/pkgs/by-name/bu/bundix/package.nix
nicoo 2641d97cbf pkgs/by-name: Convert hashes to SRI format
Reproduction script:
	# Bulk rewrite
	./maintainers/scripts/sha-to-sri.py pkgs/by-name
	# Revert some packages which will need manual intervention
	for n in amdvlk azure-cli cargo-profiler corefonts flatito fluxcd gist perf_data_converter protoc-gen-js solana-cli swt verible; do
		git checkout -- "pkgs/by-name/${n:0:2}/${n}"
	done
2024-09-15 11:24:31 +02:00

50 lines
1.3 KiB
Nix

{ buildRubyGem
, fetchFromGitHub
, makeWrapper
, lib
, bundler
, nix
, nix-prefetch-git
}:
buildRubyGem rec {
inherit (bundler) ruby;
name = "${gemName}-${version}";
gemName = "bundix";
version = "2.5.2";
src = fetchFromGitHub {
owner = "nix-community";
repo = "bundix";
rev = version;
hash = "sha256-QnNdseCSwQYhO/ybzWsflMEk68TMgPU3HqXJ7av3SHE=";
};
buildInputs = [ ruby bundler ];
nativeBuildInputs = [ makeWrapper ];
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}"
'';
meta = {
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/nix-community/bundix";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ manveru zimbatm ];
platforms = lib.platforms.all;
};
}