ieda: init at 0-unstable-2024-10-11 (#338769)
[NixPkgs.git] / pkgs / by-name / pl / planus / package.nix
blobb0bde1b7caac6aca1ee2af434cc50d9ebe8c412c
2   lib,
3   rustPlatform,
4   fetchCrate,
5   installShellFiles,
6   stdenv,
7 }:
9 rustPlatform.buildRustPackage rec {
10   pname = "planus";
11   version = "1.0.0";
13   src = fetchCrate {
14     pname = "planus-cli";
15     inherit version;
16     hash = "sha256-HbnuLu1yCpwouDVBH/vcFVLDMZWeqHH6qHFJoTbaS9Y=";
17   };
19   cargoHash = "sha256-AJtQrImQlxnp1RbbOZHAJsvlhm39OlC5WyvD5jybMAY=";
21   nativeBuildInputs = [
22     installShellFiles
23   ];
25   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
26     installShellCompletion --cmd planus \
27       --bash <($out/bin/planus generate-completions bash) \
28       --fish <($out/bin/planus generate-completions fish) \
29       --zsh <($out/bin/planus generate-completions zsh)
30   '';
32   meta = with lib; {
33     description = "Alternative compiler for flatbuffers";
34     mainProgram = "planus";
35     homepage = "https://github.com/planus-org/planus";
36     changelog = "https://github.com/planus-org/planus/blob/v${version}/CHANGELOG.md";
37     license = with licenses; [
38       asl20
39       mit
40     ];
41     maintainers = with maintainers; [ figsoda ];
42   };