nixpkgs/pkgs/development/tools/the-way/default.nix

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

37 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
rustPlatform.buildRustPackage rec {
pname = "the-way";
2022-07-31 05:29:26 +02:00
version = "0.17.1";
src = fetchFromGitHub {
owner = "out-of-cheese-error";
repo = pname;
rev = "v${version}";
2022-07-31 05:29:26 +02:00
sha256 = "sha256-Imo1CUk2H4/K9w/FnIBEkKFXd7OIAuApejcNY+rs7JU=";
};
2020-09-07 06:20:00 +02:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Security ];
2020-07-31 15:00:00 +02:00
2022-07-31 05:29:26 +02:00
cargoSha256 = "sha256-3ZiNRXrb3gpXXOxztf0eimJE16PpQTD/OWFmeTDIr2w=";
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=copy" ];
dontUseCargoParallelTests = true;
2020-09-07 06:20:00 +02:00
postInstall = ''
$out/bin/the-way config default tmp.toml
for shell in bash fish zsh; do
THE_WAY_CONFIG=tmp.toml $out/bin/the-way complete $shell > the-way.$shell
installShellCompletion the-way.$shell
done
'';
meta = with lib; {
description = "Terminal code snippets manager";
homepage = "https://github.com/out-of-cheese-error/the-way";
license = with licenses; [ mit ];
maintainers = with maintainers; [ numkem ];
};
}