nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 gitUpdater,
6 setuptools,
7 unittestCheckHook,
8}:
9
10buildPythonPackage rec {
11 pname = "pycparser";
12 version = "3.00";
13 pyproject = true;
14
15 src = fetchFromGitHub {
16 owner = "eliben";
17 repo = "pycparser";
18 tag = "release_v${version}";
19 hash = "sha256-6eKc+p3xLyRPo3oCWP/dbMpHlkBXLy8XiGR0gTEHI2E=";
20 };
21
22 build-system = [ setuptools ];
23
24 pythonImportsCheck = [ "pycparser" ];
25
26 nativeCheckInputs = [ unittestCheckHook ];
27
28 unittestFlagsArray = [
29 "-s"
30 "tests"
31 ];
32
33 passthru.updateScript = gitUpdater {
34 rev-prefix = "release_v";
35 };
36
37 meta = {
38 changelog = "https://github.com/eliben/pycparser/releases/tag/${src.tag}";
39 description = "C parser in Python";
40 homepage = "https://github.com/eliben/pycparser";
41 license = lib.licenses.bsd3;
42 maintainers = [ lib.maintainers.dotlambda ];
43 };
44}