about summary refs log tree commit diff
path: root/pkgs/development/python-modules/snakemake-storage-plugin-s3/default.nix
blob: 9f194eb253570cb0b0ad8f55b2a0c8206f293adc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, fetchFromGitHub
, boto3
, botocore
, poetry-core
, snakemake
, snakemake-interface-storage-plugins
, snakemake-interface-common
, urllib3
}:

buildPythonPackage rec {
  pname = "snakemake-storage-plugin-s3";
  version = "0.2.10";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "snakemake";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-k21DRQdSUFkdwNb7MZJmClhIg+pdSc7H6FkDrbf4DT8=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace ">=2.0,<2.2" "*"
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    boto3
    botocore
    snakemake-interface-storage-plugins
    snakemake-interface-common
    urllib3
  ];

  nativeCheckInputs = [
    snakemake
  ];

  pythonImportsCheck = [ "snakemake_storage_plugin_s3" ];

  meta = with lib; {
    description = "A Snakemake storage plugin for S3 API storage (AWS S3, MinIO, etc.)";
    homepage = "https://github.com/snakemake/snakemake-storage-plugin-s3";
    license = licenses.mit;
    maintainers = with maintainers; [ veprbl ];
  };
}