evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ty / typical / package.nix
blob9eb303065ab8a057fa4dc9e58eeee8950d0dec75
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , installShellFiles
5 , stdenv
6 }:
8 rustPlatform.buildRustPackage rec {
9   pname = "typical";
10   version = "0.12.1";
12   src = fetchFromGitHub {
13     owner = "stepchowfun";
14     repo = "typical";
15     rev = "v${version}";
16     hash = "sha256-y7PWTzD9+rkC4wZYhecmDTa3AoWl4Tgh7QXbSK4Qq5Q=";
17   };
19   cargoHash = "sha256-U6dRk8fqhxxMbu283jvkjGMjbIOYqy9jN64M2VmdZ/g=";
21   nativeBuildInputs = [
22     installShellFiles
23   ];
25   preCheck = ''
26     export NO_COLOR=true
27   '';
29   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
30     installShellCompletion --cmd typical \
31       --bash <($out/bin/typical shell-completion bash) \
32       --fish <($out/bin/typical shell-completion fish) \
33       --zsh <($out/bin/typical shell-completion zsh)
34   '';
36   meta = with lib; {
37     description = "Data interchange with algebraic data types";
38     mainProgram = "typical";
39     homepage = "https://github.com/stepchowfun/typical";
40     changelog = "https://github.com/stepchowfun/typical/blob/${src.rev}/CHANGELOG.md";
41     license = licenses.mit;
42     maintainers = with maintainers; [ figsoda ];
43   };