2022-12-17 10:02:37 +00:00
|
|
|
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv, darwin }:
|
2020-06-15 15:56:04 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "the-way";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.20.3";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
2024-07-27 06:49:29 +00:00
|
|
|
hash = "sha256-/vG5LkQiA8iPP+UV1opLeJwbYfmzqYwpsoMizpGT98o=";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoHash = "sha256-iZxV099582LuZ8A3uOsKPyekAQG2cQusLZhW+W1wW/8=";
|
2022-12-17 10:02:37 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
2022-12-17 10:02:37 +00:00
|
|
|
darwin.apple_sdk.frameworks.AppKit
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
useNextest = 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";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "the-way";
|
2020-06-15 15:56:04 +00:00
|
|
|
homepage = "https://github.com/out-of-cheese-error/the-way";
|
2022-12-17 10:02:37 +00:00
|
|
|
changelog = "https://github.com/out-of-cheese-error/the-way/blob/v${version}/CHANGELOG.md";
|
2020-06-15 15:56:04 +00:00
|
|
|
license = with licenses; [ mit ];
|
2022-12-17 10:02:37 +00:00
|
|
|
maintainers = with maintainers; [ figsoda numkem ];
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
}
|