mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 22:53:42 +00:00
44 lines
937 B
Nix
44 lines
937 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, nix
|
|
, fzy
|
|
, makeWrapper
|
|
, testVersion
|
|
, comma
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "comma";
|
|
version = "1.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nix-community";
|
|
repo = "comma";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-emhvBaicLAnu/Kn4oxHngGa5BSxOEwbkhTLO5XvauMw=";
|
|
};
|
|
|
|
cargoSha256 = "sha256-mQxNo4VjW2Q0MYfU+RCb4Ayl9ClpxrSV8X4EKZ7PewA=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/comma \
|
|
--prefix PATH : ${lib.makeBinPath [ nix fzy ]}
|
|
ln -s $out/bin/comma $out/bin/,
|
|
'';
|
|
|
|
passthru.tests = {
|
|
version = testVersion { package = comma; };
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/nix-community/comma";
|
|
description = "Runs programs without installing them";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ Enzime artturin ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|