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