nixpkgs/pkgs/tools/backup/tarsnap/default.nix

42 lines
1.2 KiB
Nix
Raw Normal View History

2012-10-21 05:03:13 +04:00
{ stdenv, fetchurl, openssl, zlib, e2fsprogs }:
let
zshCompletion = fetchurl {
url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
};
in
stdenv.mkDerivation rec {
name = "tarsnap-${version}";
2016-03-11 21:57:15 +03:00
version = "1.0.37";
2012-10-21 05:03:13 +04:00
src = fetchurl {
url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
2016-03-11 21:57:15 +03:00
sha256 = "1ynv323qi6775lzjb6hvifl8ajkv2bizy43sajadjfqvcl9r96gs";
2012-10-21 05:03:13 +04:00
};
preConfigure = ''
configureFlags="--with-bash-completion-dir=$out/etc/bash_completion.d"
'';
patchPhase = ''
substituteInPlace Makefile.in \
--replace "command -p mv" "mv"
'';
postInstall = ''
# Install some handy-dandy shell completions
install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
'';
2012-10-21 05:03:13 +04:00
buildInputs = [ openssl zlib e2fsprogs ];
meta = {
description = "Online backups for the truly paranoid";
homepage = "http://www.tarsnap.com/";
license = "tarsnap";
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [ thoughtpolice roconnor ];
2012-10-21 05:03:13 +04:00
};
}