nixpkgs/pkgs/tools/package-management/comma/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
984 B
Nix
Raw Normal View History

{ comma
2021-12-12 14:15:38 +00:00
, fetchFromGitHub
, fzy
, lib
2022-11-23 04:20:00 +00:00
, makeBinaryWrapper
, nix-index-unwrapped
, rustPlatform
2022-04-26 07:59:57 +00:00
, testers
2021-12-12 14:15:38 +00:00
}:
2022-04-18 23:53:05 +00:00
rustPlatform.buildRustPackage rec {
2021-12-12 14:15:38 +00:00
pname = "comma";
2023-07-18 23:21:54 +00:00
version = "1.7.1";
2021-12-12 14:15:38 +00:00
src = fetchFromGitHub {
owner = "nix-community";
2022-04-18 23:53:05 +00:00
repo = "comma";
rev = "v${version}";
2023-07-18 23:21:54 +00:00
hash = "sha256-x2HVm2vcEFHDrCQLIp5QzNsDARcbBfPdaIMLWVNfi4c=";
2021-12-12 14:15:38 +00:00
};
2023-07-18 23:21:54 +00:00
cargoHash = "sha256-N6Bc0+m0Qz1c/80oLvQTj8gvMusPXIriegNlRYWWStU=";
2022-04-18 23:53:05 +00:00
2022-11-23 04:20:00 +00:00
nativeBuildInputs = [ makeBinaryWrapper ];
2021-12-12 14:15:38 +00:00
2022-04-18 23:53:05 +00:00
postInstall = ''
wrapProgram $out/bin/comma \
2022-11-23 04:20:00 +00:00
--prefix PATH : ${lib.makeBinPath [ fzy nix-index-unwrapped ]}
2022-04-18 23:53:05 +00:00
ln -s $out/bin/comma $out/bin/,
2021-12-12 14:15:38 +00:00
'';
2022-04-18 23:53:05 +00:00
passthru.tests = {
2022-04-26 07:59:57 +00:00
version = testers.testVersion { package = comma; };
2022-04-18 23:53:05 +00:00
};
2021-12-12 14:15:38 +00:00
meta = with lib; {
homepage = "https://github.com/nix-community/comma";
2022-04-18 23:53:05 +00:00
description = "Runs programs without installing them";
2021-12-12 14:15:38 +00:00
license = licenses.mit;
2023-10-13 12:34:25 +00:00
mainProgram = "comma";
2022-11-23 04:20:00 +00:00
maintainers = with maintainers; [ Enzime artturin marsam ];
2021-12-12 14:15:38 +00:00
};
}