backblaze-b2: 1.3.8 -> 2.0.2
This commit is contained in:
parent
36a68c8e82
commit
28142d6f84
@ -1,40 +1,39 @@
|
|||||||
{ lib, buildPythonApplication, fetchFromGitHub
|
{
|
||||||
, arrow, futures, logfury, requests, six, tqdm
|
fetchFromGitHub,
|
||||||
|
lib,
|
||||||
|
python3Packages,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "backblaze-b2";
|
pname = "backblaze-b2";
|
||||||
version = "1.3.8";
|
version = "2.0.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Backblaze";
|
owner = "Backblaze";
|
||||||
repo = "B2_Command_Line_Tool";
|
repo = "B2_Command_Line_Tool";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1y4z4w6fj92rh9mrjsi0nmnzcmrj5jikarq2vs5qznvjdjm62igw";
|
sha256 = "00zs0a580vvfm2w4ja68mc46360p475wlgagjkq1hi4m8s4qwd75";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ arrow futures logfury requests six tqdm ];
|
propagatedBuildInputs = with python3Packages; [
|
||||||
|
b2sdk
|
||||||
|
class-registry
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
checkInputs = with python3Packages; [
|
||||||
|
nose
|
||||||
|
];
|
||||||
|
|
||||||
|
# doCheck = false;
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
python test_b2_command_line.py test
|
nosetests
|
||||||
'';
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
# b2 uses an upper bound on arrow, because arrow 0.12.1 is not
|
|
||||||
# compatible with Python 2.6:
|
|
||||||
#
|
|
||||||
# https://github.com/crsmithdev/arrow/issues/517
|
|
||||||
#
|
|
||||||
# However, since we use Python 2.7, newer versions of arrow are fine.
|
|
||||||
|
|
||||||
sed -i 's/,<0.12.1//g' requirements.txt
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv "$out/bin/b2" "$out/bin/backblaze-b2"
|
mv "$out/bin/b2" "$out/bin/backblaze-b2"
|
||||||
|
|
||||||
sed 's/^_have b2 \&\&$/_have backblaze-b2 \&\&/' -i contrib/bash_completion/b2
|
sed 's/b2/backblaze-b2/' -i contrib/bash_completion/b2
|
||||||
sed 's/^\(complete -F _b2\) b2/\1 backblaze-b2/' -i contrib/bash_completion/b2
|
|
||||||
|
|
||||||
mkdir -p "$out/etc/bash_completion.d"
|
mkdir -p "$out/etc/bash_completion.d"
|
||||||
cp contrib/bash_completion/b2 "$out/etc/bash_completion.d/backblaze-b2"
|
cp contrib/bash_completion/b2 "$out/etc/bash_completion.d/backblaze-b2"
|
||||||
|
Loading…
Reference in New Issue
Block a user