depot/third_party/nixpkgs/pkgs/tools/package-management/comma/default.nix
Default email a0cb138ada Project import generated by Copybara.
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
2023-02-02 18:25:31 +00:00

42 lines
957 B
Nix

{ comma
, fetchFromGitHub
, fzy
, lib
, makeBinaryWrapper
, nix-index-unwrapped
, rustPlatform
, testers
}:
rustPlatform.buildRustPackage rec {
pname = "comma";
version = "1.4.1";
src = fetchFromGitHub {
owner = "nix-community";
repo = "comma";
rev = "v${version}";
hash = "sha256-5M2VVrYH+IAa1P7Qz9gUPS3YNdqeVOoa1riV8eTtoYE=";
};
cargoHash = "sha256-kdhzoExiUAevid5NCCDTkK5CO+esa/SRGOcrITlr2fo=";
nativeBuildInputs = [ makeBinaryWrapper ];
postInstall = ''
wrapProgram $out/bin/comma \
--prefix PATH : ${lib.makeBinPath [ fzy nix-index-unwrapped ]}
ln -s $out/bin/comma $out/bin/,
'';
passthru.tests = {
version = testers.testVersion { package = comma; };
};
meta = with lib; {
homepage = "https://github.com/nix-community/comma";
description = "Runs programs without installing them";
license = licenses.mit;
maintainers = with maintainers; [ Enzime artturin marsam ];
};
}