1{
2 lib,
3 pythonOlder,
4 buildPythonPackage,
5 fetchPypi,
6 pytestCheckHook,
7 click,
8}:
9
10buildPythonPackage rec {
11 pname = "lexid";
12 version = "2021.1006";
13 format = "setuptools";
14 disabled = pythonOlder "3.6";
15 src = fetchPypi {
16 inherit pname version;
17 sha256 = "509a3a4cc926d3dbf22b203b18a4c66c25e6473fb7c0e0d30374533ac28bafe5";
18 };
19
20 prePatch = ''
21 # Disable lib3to6, since we're only building this on 3.6+ anyway.
22 substituteInPlace setup.py \
23 --replace 'if any(arg.startswith("bdist") for arg in sys.argv):' 'if False:'
24 '';
25
26 propagatedBuildInputs = [ click ];
27
28 nativeCheckInputs = [ pytestCheckHook ];
29
30 meta = with lib; {
31 description = "Micro library to increment lexically ordered numerical ids";
32 mainProgram = "lexid_incr";
33 homepage = "https://pypi.org/project/lexid/";
34 license = licenses.mit;
35 maintainers = with maintainers; [ kfollesdal ];
36 };
37}