1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, bson
6, pytestCheckHook
7, pyyaml
8, setuptools
9}:
10
11buildPythonPackage rec {
12 pname = "pymarshal";
13 version = "2.2.0";
14 disabled = pythonOlder "3.0";
15
16 src = fetchFromGitHub {
17 owner = "stargateaudio";
18 repo = pname;
19 rev = version;
20 hash = "sha256-Ds8JV2mtLRcKXBvPs84Hdj3MxxqpeV5muKCSlAFCj1A=";
21 };
22
23 postPatch = ''
24 substituteInPlace setup.py \
25 --replace "'pytest-runner'" ""
26 substituteInPlace setup.cfg \
27 --replace "--cov=pymarshal --cov-report=html --cov-report=term" ""
28 '';
29
30 nativeBuildInputs = [
31 setuptools
32 ];
33
34 propagatedBuildInputs = [
35 bson
36 ];
37
38 nativeCheckInputs = [
39 pytestCheckHook
40 bson
41 pyyaml
42 ];
43
44 pytestFlagsArray = [ "test" ];
45
46 meta = {
47 description = "Python data serialization library";
48 homepage = "https://github.com/stargateaudio/pymarshal";
49 maintainers = with lib.maintainers; [ yuu ];
50 license = lib.licenses.bsd2;
51 };
52}