From 0f2011c76c002ffadf31256dc2090b9bb4813fc1 Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Sun, 6 Mar 2016 18:13:26 +0100 Subject: b2: delete in favor of backblaze-b2 --- pkgs/tools/backup/b2/default.nix | 24 ------------------------ pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 26 deletions(-) delete mode 100644 pkgs/tools/backup/b2/default.nix (limited to 'pkgs') diff --git a/pkgs/tools/backup/b2/default.nix b/pkgs/tools/backup/b2/default.nix deleted file mode 100644 index 023b4af8398..00000000000 --- a/pkgs/tools/backup/b2/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ fetchFromGitHub, pythonPackages, stdenv }: - -pythonPackages.buildPythonPackage rec { - name = "b2-${version}"; - namePrefix = ""; - version = "0.4.4"; - - src = fetchFromGitHub { - owner = "Backblaze"; - repo = "B2_Command_Line_Tool"; - rev = "v${version}"; - sha256 = "1g9j5s69w6n70nb18rvx3gm9f4gi1vis23ib8rn2v1khv6z2acqp"; - }; - - pythonPath = [ pythonPackages.six ]; - - meta = with stdenv.lib; { - homepage = https://github.com/Backblaze/B2_Command_Line_Tool; - description = "CLI for accessing Backblaze's B2 Cloud Storage"; - license = licenses.mit; - platforms = platforms.all; - maintainers = with maintainers; [ hrdinka ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cdf33826779..43c001919fe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1009,8 +1009,6 @@ let asynk = callPackage ../tools/networking/asynk { }; - b2 = callPackage ../tools/backup/b2 { }; - bacula = callPackage ../tools/backup/bacula { }; bareos = callPackage ../tools/backup/bareos { }; -- cgit 1.4.1 From d8f2e6aa7129b0b487665fe73d0b593a762e485f Mon Sep 17 00:00:00 2001 From: Christoph Hrdinka Date: Sun, 6 Mar 2016 18:14:25 +0100 Subject: backblaze-b2: 0.3.10 -> 0.4.4 --- pkgs/development/tools/backblaze-b2/default.nix | 34 +++++++++++++++---------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'pkgs') diff --git a/pkgs/development/tools/backblaze-b2/default.nix b/pkgs/development/tools/backblaze-b2/default.nix index 3c7d69bc1b4..0ba346ec110 100644 --- a/pkgs/development/tools/backblaze-b2/default.nix +++ b/pkgs/development/tools/backblaze-b2/default.nix @@ -1,31 +1,37 @@ -{ stdenv, lib, fetchFromGitHub, pkgs }: +{ fetchFromGitHub, makeWrapper, pythonPackages, stdenv }: -stdenv.mkDerivation rec { - name = "backblaze-b2-0.3.10"; +pythonPackages.buildPythonApplication rec { + name = "backblaze-b2-${version}"; + version = "0.4.4"; src = fetchFromGitHub { owner = "Backblaze"; repo = "B2_Command_Line_Tool"; - rev = "b097f0f04d3f88d7a372b50ee6db1f89a5249028"; - sha256 = "1rcy8180476cpmrbls4424qbq8nyq7mxkfikd52a8skz7rd5ljc6"; + rev = "74a5e567925899f1fc6204aa85d4c84c0d0e511a"; + sha256 = "1g9j5s69w6n70nb18rvx3gm9f4gi1vis23ib8rn2v1khv6z2acqp"; }; - - buildInputs = with pkgs; [ python2 ]; - doCheck = true; + propagatedBuildInputs = with pythonPackages; [ six ]; + checkPhase = '' python test_b2_command_line.py test ''; - installPhase = '' - install -Dm755 b2 "$out/bin/backblaze-b2" + 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" ''; meta = with stdenv.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; [ kevincox ]; - platforms = platforms.unix; + homepage = https://github.com/Backblaze/B2_Command_Line_Tool; + license = licenses.mit; + maintainers = with maintainers; [ hrdinka kevincox ]; + platforms = platforms.unix; }; } -- cgit 1.4.1