forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / la / lalrpop / package.nix
blobcc52d2622f557f9458f69eb8e487b94fdfc72119
1 { lib
2 , rustPlatform
3 , fetchFromGitHub
4 , substituteAll
5 , stdenv
6 }:
8 rustPlatform.buildRustPackage rec {
9   pname = "lalrpop";
10   version = "0.20.2";
12   src = fetchFromGitHub {
13     owner = "lalrpop";
14     repo = "lalrpop";
15     rev = version;
16     hash = "sha256-cFwBck+bdOjhF6rQQj03MOO+XCsrII5c4Xvhsw12ETA=";
17   };
19   cargoHash = "sha256-zkPLas+fQQzm7LlWNpTooUR/e30KMS9OET6PMwQ2yAA=";
21   patches = [
22     (substituteAll {
23       src = ./use-correct-binary-path-in-tests.patch;
24       target_triple = stdenv.hostPlatform.rust.rustcTarget;
25     })
26   ];
28   buildAndTestSubdir = "lalrpop";
30   # there are some tests in lalrpop-test and some in lalrpop
31   checkPhase = ''
32     buildAndTestSubdir=lalrpop-test cargoCheckHook
33     cargoCheckHook
34   '';
36   meta = with lib; {
37     description = "LR(1) parser generator for Rust";
38     homepage = "https://github.com/lalrpop/lalrpop";
39     changelog = "https://github.com/lalrpop/lalrpop/blob/${src.rev}/RELEASES.md";
40     license = with licenses; [ asl20 /* or */ mit ];
41     mainProgram = "lalrpop";
42     maintainers = with maintainers; [ chayleaf ];
43   };