5e9e1146e1
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
42 lines
957 B
Nix
42 lines
957 B
Nix
{ comma
|
|
, fetchFromGitHub
|
|
, fzy
|
|
, lib
|
|
, makeBinaryWrapper
|
|
, nix-index-unwrapped
|
|
, rustPlatform
|
|
, testers
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "comma";
|
|
version = "1.7.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nix-community";
|
|
repo = "comma";
|
|
rev = "v${version}";
|
|
hash = "sha256-x2HVm2vcEFHDrCQLIp5QzNsDARcbBfPdaIMLWVNfi4c=";
|
|
};
|
|
|
|
cargoHash = "sha256-N6Bc0+m0Qz1c/80oLvQTj8gvMusPXIriegNlRYWWStU=";
|
|
|
|
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 ];
|
|
};
|
|
}
|