2022-04-22 13:31:35 +02:00
|
|
|
{ comma
|
2021-12-12 15:15:38 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, fzy
|
2022-04-22 13:31:35 +02:00
|
|
|
, lib
|
2022-11-23 05:20:00 +01:00
|
|
|
, makeBinaryWrapper
|
|
|
|
, nix-index-unwrapped
|
2022-04-22 13:31:35 +02:00
|
|
|
, rustPlatform
|
2022-04-26 09:59:57 +02:00
|
|
|
, testers
|
2021-12-12 15:15:38 +01:00
|
|
|
}:
|
|
|
|
|
2022-04-19 01:53:05 +02:00
|
|
|
rustPlatform.buildRustPackage rec {
|
2021-12-12 15:15:38 +01:00
|
|
|
pname = "comma";
|
2023-02-02 05:57:54 +01:00
|
|
|
version = "1.4.1";
|
2021-12-12 15:15:38 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nix-community";
|
2022-04-19 01:53:05 +02:00
|
|
|
repo = "comma";
|
|
|
|
rev = "v${version}";
|
2023-02-02 05:57:54 +01:00
|
|
|
hash = "sha256-5M2VVrYH+IAa1P7Qz9gUPS3YNdqeVOoa1riV8eTtoYE=";
|
2021-12-12 15:15:38 +01:00
|
|
|
};
|
|
|
|
|
2023-02-02 05:57:54 +01:00
|
|
|
cargoHash = "sha256-kdhzoExiUAevid5NCCDTkK5CO+esa/SRGOcrITlr2fo=";
|
2022-04-19 01:53:05 +02:00
|
|
|
|
2022-11-23 05:20:00 +01:00
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
2021-12-12 15:15:38 +01:00
|
|
|
|
2022-04-19 01:53:05 +02:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/comma \
|
2022-11-23 05:20:00 +01:00
|
|
|
--prefix PATH : ${lib.makeBinPath [ fzy nix-index-unwrapped ]}
|
2022-04-19 01:53:05 +02:00
|
|
|
ln -s $out/bin/comma $out/bin/,
|
2021-12-12 15:15:38 +01:00
|
|
|
'';
|
|
|
|
|
2022-04-19 01:53:05 +02:00
|
|
|
passthru.tests = {
|
2022-04-26 09:59:57 +02:00
|
|
|
version = testers.testVersion { package = comma; };
|
2022-04-19 01:53:05 +02:00
|
|
|
};
|
|
|
|
|
2021-12-12 15:15:38 +01:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/nix-community/comma";
|
2022-04-19 01:53:05 +02:00
|
|
|
description = "Runs programs without installing them";
|
2021-12-12 15:15:38 +01:00
|
|
|
license = licenses.mit;
|
2022-11-23 05:20:00 +01:00
|
|
|
maintainers = with maintainers; [ Enzime artturin marsam ];
|
2021-12-12 15:15:38 +01:00
|
|
|
};
|
|
|
|
}
|