2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
|
2020-06-19 12:00:04 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "the-way";
|
2020-12-01 11:00:12 +00:00
|
|
|
version = "0.12.1";
|
2020-06-19 12:00:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "out-of-cheese-error";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2020-12-01 11:00:12 +00:00
|
|
|
sha256 = "0lvkrfszmn594n9qkf518c38c0fwzm32y997wlf28l3hpj6yqddq";
|
2020-06-19 12:00:04 +01:00
|
|
|
};
|
|
|
|
|
2020-09-07 05:20:00 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2020-07-31 14:00:00 +01:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ AppKit Security ];
|
|
|
|
|
2020-12-01 11:00:12 +00:00
|
|
|
cargoSha256 = "1aiyfsvmrqcmlw0z1944i9s5g3yxc39na5mf16pb9a4bhw8zcwjr";
|
2020-09-09 12:39:23 +01:00
|
|
|
checkFlagsArray = stdenv.lib.optionals stdenv.isDarwin [ "--skip=copy" ];
|
|
|
|
cargoParallelTestThreads = false;
|
2020-06-19 12:00:04 +01:00
|
|
|
|
2020-09-07 05:20:00 +01: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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-06-19 12:00:04 +01:00
|
|
|
description = "Terminal code snippets manager";
|
|
|
|
homepage = "https://github.com/out-of-cheese-error/the-way";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ numkem ];
|
|
|
|
};
|
|
|
|
}
|