about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/s3fs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/s3fs/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/s3fs/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/s3fs/default.nix b/nixpkgs/pkgs/development/python-modules/s3fs/default.nix
new file mode 100644
index 000000000000..184f27c292ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/s3fs/default.nix
@@ -0,0 +1,55 @@
+{ lib
+, stdenv
+, aiobotocore
+, aiohttp
+, buildPythonPackage
+, docutils
+, fetchPypi
+, fsspec
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "s3fs";
+  version = "2023.12.2";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
+
+  src = fetchPypi {
+    inherit pname version;
+    hash = "sha256-tewHBiSBu7RcsGGzGYTHGI0QbiksJwMwOeAk5LpXQNw=";
+  };
+
+  postPatch = ''
+    sed -i 's/fsspec==.*/fsspec/' requirements.txt
+  '';
+
+  buildInputs = [
+    docutils
+  ];
+
+  propagatedBuildInputs = [
+    aiobotocore
+    aiohttp
+    fsspec
+  ];
+
+  # Depends on `moto` which has a long dependency chain with exact
+  # version requirements that can't be made to work with current
+  # pythonPackages.
+  doCheck = false;
+
+  pythonImportsCheck = [
+    "s3fs"
+  ];
+
+  meta = with lib; {
+    broken = stdenv.isDarwin;
+    description = "A Pythonic file interface for S3";
+    homepage = "https://github.com/fsspec/s3fs";
+    changelog = "https://github.com/fsspec/s3fs/raw/${version}/docs/source/changelog.rst";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ teh ];
+  };
+}