nixpkgs/pkgs/tools/misc/nurl/default.nix
2022-12-29 21:23:45 -05:00

38 lines
915 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, makeWrapper
, gitMinimal
, mercurial
, nix
}:
rustPlatform.buildRustPackage rec {
pname = "nurl";
version = "0.1.1";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nurl";
rev = "v${version}";
hash = "sha256-dN53Xpb3zOVI6Xpi+RRFQPLIMP3+ATMXpYpFGgFpzPw=";
};
cargoSha256 = "sha256-bdxHxLUeIPlRw7NKg0nTaDAkQam80eepqbuAmFVIMNs=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/nurl \
--prefix PATH : ${lib.makeBinPath [ gitMinimal mercurial nix ]}
'';
meta = with lib; {
description = "Command-line tool to generate Nix fetcher calls from repository URLs";
homepage = "https://github.com/nix-community/nurl";
changelog = "https://github.com/nix-community/nurl/blob/v${version}/CHANGELOG.md";
license = licenses.mpl20;
maintainers = with maintainers; [ figsoda ];
};
}