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