From 6a6581e8f276deab898212d1b03c44e1c559c0cb Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 29 May 2023 12:29:18 -0400 Subject: [PATCH] typical: init at 0.9.4 https://github.com/stepchowfun/typical --- .../tools/misc/typical/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/tools/misc/typical/default.nix diff --git a/pkgs/development/tools/misc/typical/default.nix b/pkgs/development/tools/misc/typical/default.nix new file mode 100644 index 000000000000..403d5c9d0eb1 --- /dev/null +++ b/pkgs/development/tools/misc/typical/default.nix @@ -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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ac3acd1fd63b..300913a74137 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19470,6 +19470,8 @@ with pkgs; tweak = callPackage ../applications/editors/tweak { }; + typical = callPackage ../development/tools/misc/typical { }; + uddup = callPackage ../tools/security/uddup { }; udis86 = callPackage ../development/tools/udis86 { };