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";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "0.18.0";
|
2020-06-15 15:56:04 +00:00
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "sha256-UgD9ulJtRlNuux80FQhgLYjJ6OsyWXZCBGY9qdmd9Jk=";
|
2020-06-15 15:56:04 +00:00
|
|
|
};
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
cargoSha256 = "sha256-z5+71I/q1+vz2CPAU06yjRSjpKyT6npjPi48lu21NZs=";
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2022-12-17 10:02:37 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
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";
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|