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";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "1.4.0";
|
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}";
|
2022-11-27 09:42:12 +00:00
|
|
|
hash = "sha256-EPrXIDi0yO+AVriQgi3t91CLtmYtgmyEfWtFD+wH8As=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
cargoHash = "sha256-/1b3GF0flhvejZ3C/yOzRGl50sWR4IxprwRoMUYEvm8=";
|
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
|
|
|
};
|
|
|
|
}
|