2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, installShellFiles, AppKit, Security }:
|
2020-06-19 13:00:04 +02:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "the-way";
|
2021-02-06 22:56:07 +01:00
|
|
|
version = "0.13.0";
|
2020-06-19 13:00:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "out-of-cheese-error";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-02-06 22:56:07 +01:00
|
|
|
sha256 = "sha256-OqJceRO1RFOLgNi3SbTKLw62tSfJSO7T2/u0RTX89AM=";
|
2020-06-19 13:00:04 +02:00
|
|
|
};
|
|
|
|
|
2020-09-07 06:20:00 +02:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-01-23 13:26:19 +01:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [ AppKit Security ];
|
2020-07-31 15:00:00 +02:00
|
|
|
|
2021-05-07 13:00:49 +02:00
|
|
|
cargoSha256 = "sha256-sULjd+weixTQYFIQlluPwY4MFlZ1+vMMoMn4GP79oQs=";
|
2021-01-23 13:26:19 +01:00
|
|
|
checkFlagsArray = lib.optionals stdenv.isDarwin [ "--skip=copy" ];
|
2021-02-15 10:26:40 +01:00
|
|
|
dontUseCargoParallelTests = true;
|
2020-06-19 13:00:04 +02:00
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-06-19 13:00:04 +02:00
|
|
|
description = "Terminal code snippets manager";
|
|
|
|
homepage = "https://github.com/out-of-cheese-error/the-way";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ numkem ];
|
|
|
|
};
|
|
|
|
}
|