nixpkgs/pkgs/development/tools/backblaze-b2/default.nix
Vojtěch Káně 06efb08ec4
backblaze-b2: 2.1.0 -> 2.4.0 (#121250)
* python3Packages.b2sdk: 1.6.0 -> 1.7.0

* python3Packages.b2sdk: enable tests

* pythonPackages.rst2ansi: init at 0.1.5

* backblaze-b2: 2.1.0 -> 2.4.0

Co-authored-by: Fabian Affolter <mail@fabian-affolter.ch>
2021-05-08 07:53:30 -04:00

65 lines
1.6 KiB
Nix

{ fetchFromGitHub, lib, python3Packages }:
let
python3Packages2 = python3Packages.override {
overrides = self: super: {
arrow = self.callPackage ../../python-modules/arrow/2.nix { };
};
};
in
let
python3Packages = python3Packages2; # two separate let … in to avoid infinite recursion
in
python3Packages.buildPythonApplication rec {
pname = "backblaze-b2";
version = "2.4.0";
src = python3Packages.fetchPypi {
inherit version;
pname = "b2";
sha256 = "sha256-nNQDdSjUolj3PjWRn1fPBAEtPlgeent2PxzHqwH1Z6s=";
};
postPatch = ''
substituteInPlace setup.py \
--replace 'setuptools_scm<6.0' 'setuptools_scm'
'';
propagatedBuildInputs = with python3Packages; [
b2sdk
class-registry
phx-class-registry
setuptools
docutils
rst2ansi
];
nativeBuildInputs = with python3Packages; [
setuptools-scm
];
checkInputs = with python3Packages; [ pytestCheckHook ];
disabledTests = [
"test_files_headers"
"test_integration"
];
postInstall = ''
mv "$out/bin/b2" "$out/bin/backblaze-b2"
sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2
mkdir -p "$out/share/bash-completion/completions"
cp contrib/bash_completion/b2 "$out/share/bash-completion/completions/backblaze-b2"
'';
meta = with lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service";
homepage = "https://github.com/Backblaze/B2_Command_Line_Tool";
license = licenses.mit;
maintainers = with maintainers; [ hrdinka kevincox ];
platforms = platforms.unix;
};
}