1{
2 lib,
3 fetchFromGitHub,
4 nix-update-script,
5
6 buildPythonPackage,
7 unittestCheckHook,
8 pythonOlder,
9 cargo,
10 rustc,
11 rustPlatform,
12}:
13
14buildPythonPackage rec {
15 pname = "aiotarfile";
16 version = "0.5.1";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchFromGitHub {
22 owner = "rhelmot";
23 repo = "aiotarfile";
24 rev = "refs/tags/v${version}";
25 hash = "sha256-DslG+XxIYb04I3B7m0fmRmE3hFCczF039QhSVdHGPL8=";
26 };
27 passthru.updateScript = nix-update-script { };
28
29 cargoDeps = rustPlatform.importCargoLock {
30 lockFile = ./Cargo.lock;
31 outputHashes."async-tar-0.4.2" = "sha256-C8M/5YEo3OIfN+654pVTfDm8C8qmKX5qy61NKFt7Jb4=";
32 };
33
34 nativeBuildInputs = [
35 cargo
36 rustPlatform.cargoSetupHook
37 rustPlatform.maturinBuildHook
38 rustc
39 ];
40
41 nativeCheckInputs = [ unittestCheckHook ];
42 unittestFlagsArray = [ "tests/" ]; # Not sure why it isn't autodiscovered
43
44 pythonImportsCheck = [ "aiotarfile" ];
45
46 meta = with lib; {
47 description = "Stream-based, asynchronous tarball processing";
48 homepage = "https://github.com/rhelmot/aiotarfile";
49 changelog = "https://github.com/rhelmot/aiotarfile/commits/v{version}";
50 license = licenses.mit;
51 maintainers = with maintainers; [ nicoo ];
52 };
53}