1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, python
5, pythonOlder
6, setuptools
7
8# passthru tests
9, apache-beam
10, datasets
11}:
12
13buildPythonPackage rec {
14 pname = "dill";
15 version = "0.3.7";
16 format = "pyproject";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchFromGitHub {
21 owner = "uqfoundation";
22 repo = pname;
23 rev = "refs/tags/dill-${version}";
24 hash = "sha256-1cRGA5RuNjlpc3jq9SAsUYgmPauIV8zRF9SxOmveljI=";
25 };
26
27 nativeBuildInputs = [
28 setuptools
29 ];
30
31 checkPhase = ''
32 runHook preCheck
33 ${python.interpreter} dill/tests/__main__.py
34 runHook postCheck
35 '';
36
37 passthru.tests = {
38 inherit apache-beam datasets;
39 };
40
41 pythonImportsCheck = [ "dill" ];
42
43 meta = with lib; {
44 description = "Serialize all of python (almost)";
45 homepage = "https://github.com/uqfoundation/dill/";
46 changelog = "https://github.com/uqfoundation/dill/releases/tag/dill-${version}";
47 license = licenses.bsd3;
48 maintainers = with maintainers; [ tjni ];
49 };
50}