about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pymarshal/default.nix
blob: 7da938526422c64b074a9230044ba5ce377edf25 (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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, bson
, pytestCheckHook
, pyyaml
, setuptools
}:

buildPythonPackage rec {
  pname = "pymarshal";
  version = "2.2.0";
  disabled = pythonOlder "3.0";

  src = fetchFromGitHub {
    owner = "stargateaudio";
    repo = pname;
    rev = version;
    sha256 = "sha256-Ds8JV2mtLRcKXBvPs84Hdj3MxxqpeV5muKCSlAFCj1A=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace "'pytest-runner'" ""
    substituteInPlace setup.cfg \
      --replace "--cov=pymarshal --cov-report=html --cov-report=term" ""
  '';

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    bson
  ];

  checkInputs = [
    pytestCheckHook
    bson
    pyyaml
  ];

  pytestFlagsArray = [ "test" ];

  meta = {
    description = "Python data serialization library";
    homepage = "https://github.com/stargateaudio/pymarshal";
    maintainers = with lib.maintainers; [ yuu ];
    license = lib.licenses.bsd2;
  };
}