Files
nixpkgs/pkgs/development/python2-modules/pyparsing/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

50 lines
1.1 KiB
Nix

{
buildPythonPackage,
fetchFromGitHub,
lib,
# since this is a dependency of pytest, we need to avoid
# circular dependencies
jinja2,
railroad-diagrams,
}:
let
pyparsing = buildPythonPackage rec {
pname = "pyparsing";
version = "2.4.7";
format = "setuptools";
src = fetchFromGitHub {
owner = "pyparsing";
repo = pname;
rev = "pyparsing_${version}";
sha256 = "14pfy80q2flgzjcx8jkracvnxxnr59kjzp3kdm5nh232gk1v6g6h";
};
# circular dependencies if enabled by default
doCheck = false;
nativeCheckInputs = [
jinja2
railroad-diagrams
];
checkPhase = ''
python -m unittest
'';
passthru.tests = {
check = pyparsing.overridePythonAttrs (_: {
doCheck = true;
});
};
meta = {
homepage = "https://github.com/pyparsing/pyparsing";
description = "Alternative approach to creating and executing simple grammars, vs. the traditional lex/yacc approach, or the use of regular expressions";
license = lib.licenses.mit;
};
};
in
pyparsing