1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 setuptools,
7}:
8
9buildPythonPackage rec {
10 pname = "exrex";
11 version = "0.11.0";
12 pyproject = true;
13
14 disabled = pythonOlder "3.8";
15
16 src = fetchFromGitHub {
17 owner = "asciimoo";
18 repo = "exrex";
19 # https://github.com/asciimoo/exrex/issues/68
20 rev = "239e4da37ff3a66d8b4b398d189299ae295594c3";
21 hash = "sha256-Tn/XIIy2wnob+1FmP9bdD9+gHLQZDofF2c1FqOijKWA=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace "version=about['__version__']," "version='${version}',"
27 '';
28
29 nativeBuildInputs = [ setuptools ];
30
31 dontWrapPythonPrograms = true;
32
33 # Project thas no released tests
34 doCheck = false;
35
36 pythonImportsCheck = [ "exrex" ];
37
38 meta = with lib; {
39 description = "Irregular methods on regular expressions";
40 homepage = "https://github.com/asciimoo/exrex";
41 license = with licenses; [ agpl3Plus ];
42 maintainers = with maintainers; [ fab ];
43 };
44}