Merge pull request #234821 from figsoda/typical

This commit is contained in:
figsoda 2023-05-31 10:39:45 -04:00 committed by GitHub
commit 8d709e877f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,43 @@
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "typical";
version = "0.9.4";
src = fetchFromGitHub {
owner = "stepchowfun";
repo = "typical";
rev = "v${version}";
hash = "sha256-MkMcJY0J3wvJE01VpphS84zNWv62hbed5ZypvLzrnpo=";
};
cargoHash = "sha256-msRfZYvDnb/WeKZhCIabUB2k/AzSYVU1OYdwZNbANbM=";
nativeBuildInputs = [
installShellFiles
];
preCheck = ''
export NO_COLOR=true
'';
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd typical \
--bash <($out/bin/typical shell-completion bash) \
--fish <($out/bin/typical shell-completion fish) \
--zsh <($out/bin/typical shell-completion zsh)
'';
meta = with lib; {
description = "Data interchange with algebraic data types";
homepage = "https://github.com/stepchowfun/typical";
changelog = "https://github.com/stepchowfun/typical/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
};
}

View file

@ -19488,6 +19488,8 @@ with pkgs;
tweak = callPackage ../applications/editors/tweak { };
typical = callPackage ../development/tools/misc/typical { };
uddup = callPackage ../tools/security/uddup { };
udis86 = callPackage ../development/tools/udis86 { };