nixpkgs/pkgs/by-name/la/lalrpop/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

45 lines
1.1 KiB
Nix
Raw Normal View History

2023-02-28 17:45:43 +00:00
{ lib
, rustPlatform
, fetchFromGitHub
, substituteAll
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "lalrpop";
2024-07-05 16:22:21 +01:00
version = "0.20.2";
2023-02-28 17:45:43 +00:00
src = fetchFromGitHub {
owner = "lalrpop";
repo = "lalrpop";
2024-07-05 16:22:21 +01:00
rev = version;
hash = "sha256-cFwBck+bdOjhF6rQQj03MOO+XCsrII5c4Xvhsw12ETA=";
2023-02-28 17:45:43 +00:00
};
2024-07-05 16:22:21 +01:00
cargoHash = "sha256-zkPLas+fQQzm7LlWNpTooUR/e30KMS9OET6PMwQ2yAA=";
2023-02-28 17:45:43 +00:00
patches = [
(substituteAll {
src = ./use-correct-binary-path-in-tests.patch;
target_triple = stdenv.hostPlatform.rust.rustcTarget;
2023-02-28 17:45:43 +00:00
})
];
buildAndTestSubdir = "lalrpop";
# there are some tests in lalrpop-test and some in lalrpop
checkPhase = ''
buildAndTestSubdir=lalrpop-test cargoCheckHook
cargoCheckHook
'';
meta = with lib; {
description = "LR(1) parser generator for Rust";
homepage = "https://github.com/lalrpop/lalrpop";
changelog = "https://github.com/lalrpop/lalrpop/blob/${src.rev}/RELEASES.md";
license = with licenses; [ asl20 /* or */ mit ];
mainProgram = "lalrpop";
2023-02-28 17:45:43 +00:00
maintainers = with maintainers; [ chayleaf ];
};
}