mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
38 lines
915 B
Nix
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 ];
|
|
};
|
|
}
|