1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/backblaze-b2/default.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2016-03-06 17:14:25 +00:00
{ fetchFromGitHub, makeWrapper, pythonPackages, stdenv }:
2016-02-03 23:45:01 +00:00
2016-03-06 17:14:25 +00:00
pythonPackages.buildPythonApplication rec {
name = "backblaze-b2-${version}";
version = "0.4.4";
2016-02-03 23:45:01 +00:00
src = fetchFromGitHub {
owner = "Backblaze";
repo = "B2_Command_Line_Tool";
2016-03-06 17:14:25 +00:00
rev = "74a5e567925899f1fc6204aa85d4c84c0d0e511a";
sha256 = "1g9j5s69w6n70nb18rvx3gm9f4gi1vis23ib8rn2v1khv6z2acqp";
2016-02-03 23:45:01 +00:00
};
2016-03-06 17:14:25 +00:00
propagatedBuildInputs = with pythonPackages; [ six ];
2016-02-03 23:45:01 +00:00
checkPhase = ''
python test_b2_command_line.py test
'';
2016-03-06 17:14:25 +00:00
postInstall = ''
mv "$out/bin/b2" "$out/bin/backblaze-b2"
sed 's/^have b2 \&\&$/have 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"
cp contrib/bash_completion/b2 "$out/etc/bash_completion.d/backblaze-b2"
2016-02-03 23:45:01 +00:00
'';
meta = with stdenv.lib; {
description = "Command-line tool for accessing the Backblaze B2 storage service";
2016-03-06 17:14:25 +00:00
homepage = https://github.com/Backblaze/B2_Command_Line_Tool;
license = licenses.mit;
maintainers = with maintainers; [ hrdinka kevincox ];
platforms = platforms.unix;
2016-02-03 23:45:01 +00:00
};
}