linux_xanmod: 5.11.14 -> 5.11.15
[NixPkgs.git] / pkgs / development / python-modules / py-multicodec / default.nix
blobc41da62cf4c571c61b13b073e0a23fc928e551c0
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytest-runner
5 , pytestCheckHook
6 , pythonOlder
7 , morphys
8 , six
9 , varint
12 buildPythonPackage rec {
13   pname = "py-multicodec";
14   version = "0.2.1";
15   disabled = pythonOlder "3.5";
17   src = fetchFromGitHub {
18     owner = "multiformats";
19     repo = pname;
20     rev = "v${version}";
21     sha256 = "sha256-2aK+bfhqCMqSO+mtrHIfNQmQpQHpwd7yHseI/3O7Sp4=";
22   };
24   # Error when not substituting:
25   # Failed: [pytest] section in setup.cfg files is no longer supported, change to [tool:pytest] instead.
26   postPatch = ''
27     substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
28   '';
30   nativeBuildInputs = [
31     pytest-runner
32   ];
34   propagatedBuildInputs = [
35     varint
36     six
37     morphys
38   ];
40   checkInputs = [
41     pytestCheckHook
42   ];
44   pythonImportsCheck = [ "multicodec" ];
46   meta = with lib; {
47     description = "Compact self-describing codecs";
48     homepage = "https://github.com/multiformats/py-multicodec";
49     license = licenses.mit;
50     maintainers = with maintainers; [ Luflosi ];
51   };