587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
43 lines
984 B
Nix
43 lines
984 B
Nix
{ comma
|
|
, fetchFromGitHub
|
|
, fzy
|
|
, lib
|
|
, makeBinaryWrapper
|
|
, nix-index-unwrapped
|
|
, rustPlatform
|
|
, testers
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "comma";
|
|
version = "1.8.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nix-community";
|
|
repo = "comma";
|
|
rev = "v${version}";
|
|
hash = "sha256-PW9OS/ccRxigP0ikk1XR4QhQX4j9+ALQz0FMKXF3yRA=";
|
|
};
|
|
|
|
cargoHash = "sha256-lNz4E+dcJ6ACkNraM4DUR4yFbkWgAZ4ngbAML8JYVtE=";
|
|
|
|
nativeBuildInputs = [ makeBinaryWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/comma \
|
|
--prefix PATH : ${lib.makeBinPath [ fzy nix-index-unwrapped ]}
|
|
ln -s $out/bin/comma $out/bin/,
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testers.testVersion { package = comma; };
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/nix-community/comma";
|
|
description = "Runs programs without installing them";
|
|
license = licenses.mit;
|
|
mainProgram = "comma";
|
|
maintainers = with maintainers; [ Enzime artturin marsam ];
|
|
};
|
|
}
|