2020-09-25 04:45:31 +00:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "the-way";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "0.7.0";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "out-of-cheese-error";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1whmvzpqm8x1q45mzrp4p40nj251drcryj9z4qjxgjlfsd5d1fxq";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
|
|
|
|
|
|
|
|
cargoSha256 = "0adhgp6blwx7s1hlwqzzsgkzc43q9avxx8a9ykvvv2s1w7m9ql78";
|
|
|
|
checkFlagsArray = stdenv.lib.optionals stdenv.isDarwin [ "--skip=copy" ];
|
|
|
|
cargoParallelTestThreads = false;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Terminal code snippets manager";
|
|
|
|
homepage = "https://github.com/out-of-cheese-error/the-way";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ numkem ];
|
|
|
|
};
|
|
|
|
}
|