From 7e7f626d2823be7f546aaa21914ec88b50265bfb Mon Sep 17 00:00:00 2001 From: mxmlnkn Date: Wed, 6 Sep 2023 19:15:07 +0200 Subject: [PATCH] python3Packages.ratarmountcore: init at 0.6.0 --- .../python-modules/ratarmountcore/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/ratarmountcore/default.nix diff --git a/pkgs/development/python-modules/ratarmountcore/default.nix b/pkgs/development/python-modules/ratarmountcore/default.nix new file mode 100644 index 000000000000..49ffdb17cfa5 --- /dev/null +++ b/pkgs/development/python-modules/ratarmountcore/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchgit +, pythonOlder +, pytestCheckHook +, indexed-bzip2 +, indexed-gzip +, indexed-zstd +, python-xz +, rapidgzip +, rarfile +, zstandard # Python bindings +, zstd # System tool +}: + +buildPythonPackage rec { + pname = "ratarmountcore"; + version = "0.6.0"; + + disabled = pythonOlder "3.6"; + + src = fetchgit { + url = "https://github.com/mxmlnkn/ratarmount"; + # The revision is hardcoded for now to fix problems with the tests, which are not worthy of a new release + # tag because releases do not officially contain tests. On the next release, use the commented revision, + # which points to a release tag, instead. + #rev = "core-v${version}"; + rev = "ea43572dfbac4770a27ef2169f72ff73ee4a4ae9"; + hash = "sha256-sPApM5OW+UbujFXHSL4ptMaegajz7FNtXz/KftTlw+U="; + fetchSubmodules = true; + }; + + sourceRoot = "${src.name}/core"; + + propagatedBuildInputs = [ indexed-gzip indexed-bzip2 indexed-zstd python-xz rapidgzip rarfile ]; + + pythonImportsCheck = [ "ratarmountcore" ]; + + nativeCheckInputs = [ pytestCheckHook zstandard zstd ]; + + meta = with lib; { + description = "Library for accessing archives by way of indexing"; + homepage = "https://github.com/mxmlnkn/ratarmount/tree/master/core"; + license = licenses.mit; + maintainers = with lib.maintainers; [ mxmlnkn ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8c117f7230cc..57c1694b19af 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11011,6 +11011,8 @@ self: super: with self; { rasterio = callPackage ../development/python-modules/rasterio { }; + ratarmountcore = callPackage ../development/python-modules/ratarmountcore { inherit (pkgs) zstd; }; + ratelim = callPackage ../development/python-modules/ratelim { }; ratelimit = callPackage ../development/python-modules/ratelimit { };