evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / to / topiary / package.nix
blob6be5eedcca5fb6cd53b6b24094ff5a6ba957c53d
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , nix-update-script
5 }:
7 rustPlatform.buildRustPackage rec {
8   pname = "topiary";
9   version = "0.3.0";
11   src = fetchFromGitHub {
12     owner = "tweag";
13     repo = pname;
14     rev = "v${version}";
15     hash = "sha256-zt4uXkO6Y0Yc1Wt8l5O79oKbgNLrgip40ftD7UfUPwo=";
16   };
18   cargoLock = {
19     lockFile = ./Cargo.lock;
20     outputHashes = {
21       "tree-sitter-bash-0.19.0" = "sha256-a0/KyHV2jUpytsZSHI7tVw8GfYnuqVjfs5KScLZkB0I=";
22       "tree-sitter-facade-0.9.3" = "sha256-M/npshnHJkU70pP3I4WMXp3onlCSWM5mMIqXP45zcUs=";
23       "tree-sitter-json-0.20.0" = "sha256-cyrea0Y13OVGkXbYE0Cwc7nUsDGEZyoQmPAS9wVuHw0=";
24       "tree-sitter-nickel-0.0.1" = "sha256-aYsEx1Y5oDEqSPCUbf1G3J5Y45ULT9OkD+fn6stzrOU=";
25       "tree-sitter-ocaml-0.20.4" = "sha256-j3Hv2qOMxeBNOW+WIgIYzG3zMIFWPQpoHe94b2rT+A8=";
26       "tree-sitter-ocamllex-0.20.2" = "sha256-YhmEE7I7UF83qMuldHqc/fD/no/7YuZd6CaAIaZ1now=";
27       "tree-sitter-query-0.1.0" = "sha256-5N7FT0HTK3xzzhAlk3wBOB9xlEpKSNIfakgFnsxEi18=";
28       "tree-sitter-rust-0.20.4" = "sha256-seWoMuA87ZWCq3mUXopVeDCcTxX/Bh+B4PFLVa0CBQA=";
29       "tree-sitter-toml-0.5.1" = "sha256-5nLNBxFeOGE+gzbwpcrTVnuL1jLUA0ZLBVw2QrOLsDQ=";
30       "web-tree-sitter-sys-1.3.0" = "sha256-9rKB0rt0y9TD/HLRoB9LjEP9nO4kSWR9ylbbOXo2+2M=";
31     };
32   };
34   cargoBuildFlags = [ "-p" "topiary-cli" ];
35   cargoTestFlags = cargoBuildFlags;
37   env.TOPIARY_LANGUAGE_DIR = "${placeholder "out"}/share/queries";
39   postInstall = ''
40     install -Dm444 queries/* -t $out/share/queries
41   '';
43   passthru.updateScript = nix-update-script { };
45   meta = with lib; {
46     description = "Uniform formatter for simple languages, as part of the Tree-sitter ecosystem";
47     mainProgram = "topiary";
48     homepage = "https://github.com/tweag/topiary";
49     changelog = "https://github.com/tweag/topiary/blob/${src.rev}/CHANGELOG.md";
50     license = licenses.mit;
51     maintainers = with maintainers; [ figsoda ];
52   };