1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 boto3,
6 botocore,
7 poetry-core,
8 snakemake,
9 snakemake-interface-storage-plugins,
10 snakemake-interface-common,
11 urllib3,
12}:
13
14buildPythonPackage rec {
15 pname = "snakemake-storage-plugin-s3";
16 version = "0.2.11";
17 format = "pyproject";
18
19 src = fetchFromGitHub {
20 owner = "snakemake";
21 repo = pname;
22 rev = "refs/tags/v${version}";
23 hash = "sha256-pAMrWJe4+PWHglZ/C83Af+uHBg9wupfSlH4W8CvO9as=";
24 };
25
26 postPatch = ''
27 substituteInPlace pyproject.toml \
28 --replace ">=2.0,<2.2" "*"
29 '';
30
31 nativeBuildInputs = [ poetry-core ];
32
33 propagatedBuildInputs = [
34 boto3
35 botocore
36 snakemake-interface-storage-plugins
37 snakemake-interface-common
38 urllib3
39 ];
40
41 nativeCheckInputs = [ snakemake ];
42
43 pythonImportsCheck = [ "snakemake_storage_plugin_s3" ];
44
45 meta = with lib; {
46 description = "A Snakemake storage plugin for S3 API storage (AWS S3, MinIO, etc.)";
47 homepage = "https://github.com/snakemake/snakemake-storage-plugin-s3";
48 license = licenses.mit;
49 maintainers = with maintainers; [ veprbl ];
50 };
51}