2022-04-02 20:31:40 +00:00
|
|
|
{ lib, stdenv, fetchurl, openssl, zlib, e2fsprogs, bash, bzip2 }:
|
2012-10-21 01:03:13 +00:00
|
|
|
|
2015-08-18 03:00:47 +00:00
|
|
|
let
|
|
|
|
zshCompletion = fetchurl {
|
|
|
|
url = "https://gist.githubusercontent.com/thoughtpolice/daa9431044883d3896f6/raw/282360677007db9739e5bf229873d3b231eb303a/tarsnap.zsh";
|
|
|
|
sha256 = "0pawqwichzpz29rva7mh8lpx4zznnrh2rqyzzj6h7z98l0dxpair";
|
|
|
|
};
|
|
|
|
in
|
2015-08-18 02:48:08 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "tarsnap";
|
2022-02-13 18:43:52 +00:00
|
|
|
version = "1.0.40";
|
2012-10-21 01:03:13 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2015-08-31 13:01:35 +00:00
|
|
|
url = "https://www.tarsnap.com/download/tarsnap-autoconf-${version}.tgz";
|
2022-02-13 18:43:52 +00:00
|
|
|
sha256 = "1mbzq81l4my5wdhyxyma04sblr43m8p7ryycbpi6n78w1hwfbjmw";
|
2012-10-21 01:03:13 +00:00
|
|
|
};
|
|
|
|
|
2015-08-31 13:01:35 +00:00
|
|
|
preConfigure = ''
|
2020-11-12 21:22:18 +00:00
|
|
|
configureFlags="--with-bash-completion-dir=$out/share/bash-completion/completions"
|
2015-08-31 13:01:35 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace Makefile.in \
|
|
|
|
--replace "command -p mv" "mv"
|
2022-02-13 18:43:52 +00:00
|
|
|
substituteInPlace configure \
|
|
|
|
--replace "command -p getconf PATH" "echo $PATH"
|
2015-08-31 13:01:35 +00:00
|
|
|
'';
|
|
|
|
|
2015-08-18 03:00:47 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Install some handy-dandy shell completions
|
2015-08-31 13:01:35 +00:00
|
|
|
install -m 444 -D ${zshCompletion} $out/share/zsh/site-functions/_tarsnap
|
2015-08-18 03:00:47 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-02 20:31:40 +00:00
|
|
|
buildInputs = [ openssl zlib ] ++ lib.optional stdenv.isLinux e2fsprogs
|
|
|
|
++ lib.optional stdenv.isDarwin bzip2;
|
2012-10-21 01:03:13 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Online backups for the truly paranoid";
|
2015-08-18 02:48:08 +00:00
|
|
|
homepage = "http://www.tarsnap.com/";
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.unfree;
|
|
|
|
platforms = lib.platforms.unix;
|
|
|
|
maintainers = with lib.maintainers; [ thoughtpolice roconnor ];
|
2012-10-21 01:03:13 +00:00
|
|
|
};
|
|
|
|
}
|