depot/third_party/nixpkgs/pkgs/development/python-modules/pymarshal/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

53 lines
1,010 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, bson
, pytestCheckHook
, pyyaml
, setuptools
}:
buildPythonPackage rec {
pname = "pymarshal";
version = "2.2.0";
format = "setuptools";
disabled = pythonOlder "3.0";
src = fetchFromGitHub {
owner = "stargateaudio";
repo = pname;
rev = version;
hash = "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
];
nativeCheckInputs = [
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;
};
}