depot/third_party/nixpkgs/pkgs/development/tools/the-way/default.nix
Default email 0d9fc34957 Project import generated by Copybara.
GitOrigin-RevId: 5ed481943351e9fd354aeb557679624224de38d5
2023-01-20 11:41:00 +01:00

37 lines
1.1 KiB
Nix

{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv, darwin }:
rustPlatform.buildRustPackage rec {
pname = "the-way";
version = "0.19.1";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-d4ws5EsYVaxjfDbzoMO3kcJsrk/Htw3Ath3z3UGW7rk=";
};
cargoSha256 = "sha256-6zphQRhh32iophXSuzbQC5BOuKM92sLS5vXndwF+spg=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.AppKit
];
useNextest = true;
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
'';
meta = with lib; {
description = "Terminal code snippets manager";
homepage = "https://github.com/out-of-cheese-error/the-way";
changelog = "https://github.com/out-of-cheese-error/the-way/blob/v${version}/CHANGELOG.md";
license = with licenses; [ mit ];
maintainers = with maintainers; [ figsoda numkem ];
};
}