1{ fetchFromGitHub, pythonPackages, stdenv }:
2
3stdenv.mkDerivation rec {
4 name = "b2-${version}";
5 version = "git-26.01.2016";
6
7 src = fetchFromGitHub {
8 owner = "Backblaze";
9 repo = "B2_Command_Line_Tool";
10 rev = "b3f06fd53eb1c9a07740b962284753cba413a7b8";
11 sha256 = "0kn2lkh8hp6g8q88glyz03z1r8a47pqm91dc5w083i334swqkjp2";
12 };
13
14 buildInputs = [ pythonPackages.wrapPython ];
15
16 installPhase = ''
17 mkdir -p $out/bin
18 cp b2 $out/bin
19 '';
20
21 postInstall = "wrapPythonPrograms";
22
23 meta = with stdenv.lib; {
24 homepage = https://github.com/Backblaze/B2_Command_Line_Tool;
25 description = "CLI for accessing Backblaze's B2 Cloud Storage";
26 license = licenses.mit;
27 platforms = platforms.all;
28 maintainers = with maintainers; [ hrdinka ];
29 };
30}