1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 bson,
6 pytestCheckHook,
7 pyyaml,
8 setuptools,
9}:
10
11buildPythonPackage rec {
12 pname = "pymarshal";
13 version = "2.2.0";
14 format = "setuptools";
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 = [ setuptools ];
31
32 propagatedBuildInputs = [ bson ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 bson
37 pyyaml
38 ];
39
40 pytestFlagsArray = [ "test" ];
41
42 meta = {
43 description = "Python data serialization library";
44 homepage = "https://github.com/stargateaudio/pymarshal";
45 maintainers = with lib.maintainers; [ yuu ];
46 license = lib.licenses.bsd2;
47 };
48}