mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 11:40:45 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
39 lines
1.1 KiB
Nix
39 lines
1.1 KiB
Nix
{ lib, rustPlatform, fetchCrate, installShellFiles, stdenv, darwin }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "the-way";
|
|
version = "0.20.3";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
sha256 = "sha256-/vG5LkQiA8iPP+UV1opLeJwbYfmzqYwpsoMizpGT98o=";
|
|
};
|
|
|
|
cargoHash = "sha256-iZxV099582LuZ8A3uOsKPyekAQG2cQusLZhW+W1wW/8=";
|
|
|
|
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";
|
|
mainProgram = "the-way";
|
|
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 ];
|
|
};
|
|
}
|