4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{ stdenv
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, lib
|
|
, python
|
|
, serpent
|
|
, dill
|
|
, cloudpickle
|
|
, msgpack
|
|
, isPy27
|
|
, selectors34
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "Pyro4";
|
|
version = "4.80";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "46847ca703de3f483fbd0b2d22622f36eff03e6ef7ec7704d4ecaa3964cb2220";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
serpent
|
|
] ++ lib.optionals isPy27 [ selectors34 ];
|
|
|
|
buildInputs = [
|
|
dill
|
|
cloudpickle
|
|
msgpack
|
|
];
|
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
# add testsupport.py to PATH
|
|
preCheck = "PYTHONPATH=tests/PyroTests:$PYTHONPATH";
|
|
|
|
# ignore network related tests, which fail in sandbox
|
|
pytestFlagsArray = [ "--ignore=tests/PyroTests/test_naming.py" ];
|
|
|
|
disabledTests = [
|
|
"StartNSfunc"
|
|
"Broadcast"
|
|
"GetIP"
|
|
];
|
|
|
|
# otherwise the tests hang the build
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "Distributed object middleware for Python (RPC)";
|
|
homepage = "https://github.com/irmen/Pyro4";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ prusnak ];
|
|
};
|
|
}
|