nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3,
5 replaceVars,
6 sqlite,
7 which,
8 nix-update-script,
9 writableTmpDirAsHomeHook,
10}:
11
12let
13 inherit (python3.pkgs)
14 buildPythonApplication
15 setuptools
16 cython
17 apsw
18 cryptography
19 defusedxml
20 google-auth
21 google-auth-oauthlib
22 pyfuse3
23 requests
24 trio
25 pytest-trio
26 pytestCheckHook
27 python
28 ;
29in
30
31buildPythonApplication rec {
32 pname = "s3ql";
33 version = "5.3.0";
34 pyproject = true;
35
36 src = fetchFromGitHub {
37 owner = "s3ql";
38 repo = "s3ql";
39 tag = "s3ql-${version}";
40 hash = "sha256-SVB+VB508hGXvdHZo5lt09yssjjwHS1tsDU8M4j+swc=";
41 };
42
43 patches = [
44 (replaceVars ./0001-setup.py-remove-self-reference.patch { inherit version; })
45 ];
46
47 build-system = [ setuptools ];
48
49 nativeBuildInputs = [
50 which
51 cython
52 ];
53
54 dependencies = [
55 apsw
56 cryptography
57 defusedxml
58 google-auth
59 google-auth-oauthlib
60 pyfuse3
61 requests
62 sqlite
63 trio
64 ];
65
66 nativeCheckInputs = [
67 pytest-trio
68 pytestCheckHook
69 writableTmpDirAsHomeHook
70 ];
71
72 preBuild = ''
73 ${python.pythonOnBuildForHost.interpreter} ./setup.py build_cython build_ext --inplace
74 '';
75
76 pythonImportsCheck = [ "s3ql" ];
77
78 enabledTestPaths = [ "tests/" ];
79
80 # SSL EOF error doesn't match connection reset error. Seems fine.
81 disabledTests = [ "test_aborted_write2" ];
82
83 passthru.updateScript = nix-update-script {
84 extraArgs = [
85 "--version-regex"
86 "s3ql-([0-9.]+)"
87 ];
88 };
89
90 meta = {
91 description = "Full-featured file system for online data storage";
92 homepage = "https://github.com/s3ql/s3ql/";
93 changelog = "https://github.com/s3ql/s3ql/releases/tag/s3ql-${version}";
94 license = lib.licenses.gpl3Only;
95 maintainers = with lib.maintainers; [ rushmorem ];
96 platforms = lib.platforms.linux;
97 };
98}