about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/lexid/default.nix
blob: 788cb1e2056bebf5c433803de8a854e36bb2d06b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, pythonOlder, buildPythonPackage, fetchPypi, pytestCheckHook, click }:

buildPythonPackage rec {
  pname = "lexid";
  version = "2021.1006";
  format = "setuptools";
  disabled = pythonOlder "3.6";
  src = fetchPypi {
    inherit pname version;
    sha256 = "509a3a4cc926d3dbf22b203b18a4c66c25e6473fb7c0e0d30374533ac28bafe5";
  };

  prePatch = ''
    # Disable lib3to6, since we're only building this on 3.6+ anyway.
    substituteInPlace setup.py \
      --replace 'if any(arg.startswith("bdist") for arg in sys.argv):' 'if False:'
  '';

  propagatedBuildInputs = [ click ];

  nativeCheckInputs = [ pytestCheckHook ];

  meta = with lib; {
    description = "micro library to increment lexically ordered numerical ids";
    homepage = "https://pypi.org/project/lexid/";
    license = licenses.mit;
    maintainers = with maintainers; [ kfollesdal ];
  };
}