Unverified Commit 8d709e87 authored by figsoda's avatar figsoda Committed by GitHub
Browse files

Merge pull request #234821 from figsoda/typical

parents cadc1481 6a6581e8
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -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 { };