2012-10-21 03:03:13 +02:00
|
|
|
{ stdenv, fetchurl, openssl, zlib, e2fsprogs }:
|
|
|
|
|
2015-08-18 05:00:47 +02:00
|
|
|
let
|
|
|
|
zshCompletion = fetchurl {
|
|
|
|
url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
|
|
|
|
sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
|
|
|
|
};
|
|
|
|
in
|
2015-08-18 04:48:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "tarsnap-${version}";
|
2017-07-16 04:58:07 +02:00
|
|
|
version = "1.0.38";
|
2012-10-21 03:03:13 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-31 15:01:35 +02:00
|
|
|
url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
|
2017-07-16 04:58:07 +02:00
|
|
|
sha256 = "0nyd722i7q8h81h5mvwxai0f3jmwd93r3ahjkmr12k55p8c0rvkn";
|
2012-10-21 03:03:13 +02:00
|
|
|
};
|
|
|
|
|
2015-08-31 15:01:35 +02:00
|
|
|
preConfigure = ''
|
|
|
|
configureFlags="--with-bash-completion-dir=$out/etc/bash_completion.d"
|
|
|
|
'';
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace "command -p mv" "mv"
|
|
|
|
'';
|
|
|
|
|
2015-08-18 05:00:47 +02:00
|
|
|
postInstall = ''
|
|
|
|
# Install some handy-dandy shell completions
|
2015-08-31 15:01:35 +02:00
|
|
|
install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
|
2015-08-18 05:00:47 +02:00
|
|
|
'';
|
|
|
|
|
2017-02-06 03:18:09 +01:00
|
|
|
buildInputs = [ openssl zlib ] ++ stdenv.lib.optional stdenv.isLinux e2fsprogs ;
|
2012-10-21 03:03:13 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Online backups for the truly paranoid";
|
2015-08-18 04:48:08 +02:00
|
|
|
homepage = "http://www.tarsnap.com/";
|
|
|
|
license = "tarsnap";
|
2017-02-06 03:18:09 +01:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2015-08-18 04:48:08 +02:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ thoughtpolice roconnor ];
|
2012-10-21 03:03:13 +02:00
|
|
|
};
|
|
|
|
}
|