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
|
|
|
|
, makeWrapper
|
|
|
|
, nix
|
|
|
|
, nix-index
|
|
|
|
, 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-04-27 09:35:20 +00:00
|
|
|
version = "1.2.3";
|
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}";
|
|
|
|
sha256 = "sha256-emhvBaicLAnu/Kn4oxHngGa5BSxOEwbkhTLO5XvauMw=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
cargoSha256 = "sha256-mQxNo4VjW2Q0MYfU+RCb4Ayl9ClpxrSV8X4EKZ7PewA=";
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2022-01-13 20:06:32 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/comma \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ nix fzy nix-index ]}
|
|
|
|
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-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ Enzime artturin ];
|
2022-01-13 20:06:32 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|