2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "the-way";
|
2022-09-09 14:08:57 +00:00
|
|
|
version = "0.17.1";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "out-of-cheese-error";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-09 14:08:57 +00:00
|
|
|
sha256 = "sha256-Imo1CUk2H4/K9w/FnIBEkKFXd7OIAuApejcNY+rs7JU=";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Security ];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
cargoSha256 = "sha256-3ZiNRXrb3gpXXOxztf0eimJE16PpQTD/OWFmeTDIr2w=";
|
2021-02-05 17:12:51 +00:00
|
|
|
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=copy" ];
|
2021-03-09 03:18:52 +00:00
|
|
|
dontUseCargoParallelTests = true;
|
2020-09-25 04:45:31 +00: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
|
|
|
|
'';
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-06-15 15:56:04 +00:00
|
|
|
description = "Terminal code snippets manager";
|
|
|
|
homepage = "https://github.com/out-of-cheese-error/the-way";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ numkem ];
|
|
|
|
};
|
|
|
|
}
|