2022-04-27 09:35:20 +00:00
|
|
|
{ comma
|
2022-01-13 20:06:32 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fzy
|
2022-04-27 09:35:20 +00:00
|
|
|
, lib
|
2022-11-27 09:42:12 +00:00
|
|
|
, makeBinaryWrapper
|
|
|
|
, nix-index-unwrapped
|
2022-04-27 09:35:20 +00:00
|
|
|
, rustPlatform
|
|
|
|
, testers
|
2022-01-13 20:06:32 +00:00
|
|
|
}:
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2022-01-13 20:06:32 +00:00
|
|
|
pname = "comma";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "1.7.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nix-community";
|
2022-04-27 09:35:20 +00:00
|
|
|
repo = "comma";
|
|
|
|
rev = "v${version}";
|
2023-08-04 22:07:22 +00:00
|
|
|
hash = "sha256-x2HVm2vcEFHDrCQLIp5QzNsDARcbBfPdaIMLWVNfi4c=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
cargoHash = "sha256-N6Bc0+m0Qz1c/80oLvQTj8gvMusPXIriegNlRYWWStU=";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/comma \
|
2022-11-27 09:42:12 +00:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ fzy nix-index-unwrapped ]}
|
2022-04-27 09:35:20 +00:00
|
|
|
ln -s $out/bin/comma $out/bin/,
|
2022-01-13 20:06:32 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests = {
|
|
|
|
version = testers.testVersion { package = comma; };
|
|
|
|
};
|
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/nix-community/comma";
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Runs programs without installing them";
|
2022-01-13 20:06:32 +00:00
|
|
|
license = licenses.mit;
|
2022-11-27 09:42:12 +00:00
|
|
|
maintainers = with maintainers; [ Enzime artturin marsam ];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|