python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / tools / backblaze-b2 / default.nix
blob78224176e5a079d435d48bc2f30ded59fe5d8e26
1 { fetchFromGitHub, lib, python3Packages }:
3 python3Packages.buildPythonApplication rec {
4   pname = "backblaze-b2";
5   version = "3.6.0";
7   src = python3Packages.fetchPypi {
8     inherit version;
9     pname = "b2";
10     sha256 = "sha256-qHnnUTSLY1yncqIjG+IMLoNauvgwU04qsvH7dZZ8AlI=";
11   };
13   postPatch = ''
14     substituteInPlace requirements.txt \
15       --replace 'tabulate==0.8.10' 'tabulate'
16     substituteInPlace setup.py \
17       --replace 'setuptools_scm<6.0' 'setuptools_scm'
18   '';
20   nativeBuildInputs = with python3Packages; [
21     setuptools-scm
22   ];
24   propagatedBuildInputs = with python3Packages; [
25     b2sdk
26     phx-class-registry
27     setuptools
28     docutils
29     rst2ansi
30     tabulate
31   ];
33   checkInputs = with python3Packages; [
34     backoff
35     more-itertools
36     pytestCheckHook
37   ];
39   preCheck = ''
40     export HOME=$(mktemp -d)
41   '';
43   disabledTests = [
44     # require network
45     "test_files_headers"
46     "test_integration"
47   ];
49   disabledTestPaths = [
50     # requires network
51     "test/integration/test_b2_command_line.py"
52   ];
54   postInstall = ''
55     mv "$out/bin/b2" "$out/bin/backblaze-b2"
57     sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2
59     mkdir -p "$out/share/bash-completion/completions"
60     cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2"
61   '';
63   meta = with lib; {
64     description = "Command-line tool for accessing the Backblaze B2 storage service";
65     homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
66     license = licenses.mit;
67     maintainers = with maintainers; [ hrdinka kevincox tomhoule ];
68   };