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";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.8.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}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-PW9OS/ccRxigP0ikk1XR4QhQX4j9+ALQz0FMKXF3yRA=";
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
cargoHash = "sha256-lNz4E+dcJ6ACkNraM4DUR4yFbkWgAZ4ngbAML8JYVtE=";
|
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;
|
2023-10-19 13:55:26 +00:00
|
|
|
mainProgram = "comma";
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = with maintainers; [ artturin ];
|
2022-01-13 20:06:32 +00:00
|
|
|
};
|
|
|
|
}
|