]> git.immae.eu Git - perso/Immae/Config/Nix.git/blame - pkgs/duply/default.nix
Add quatresaisons server
[perso/Immae/Config/Nix.git] / pkgs / duply / default.nix
CommitLineData
01c4c5a4 1{ stdenv, fetchurl, makeWrapper, coreutils, python3, duplicity, gawk, gnupg1, bash, gnugrep, txt2man, which }:
98de2045
IB
2stdenv.mkDerivation rec {
3 name = "duply-${version}";
4 version = "2.1";
5
6 src = fetchurl {
7 url = "mirror://sourceforge/project/ftplicity/duply%20%28simple%20duplicity%29/2.1.x/duply_${version}.tgz";
8 sha256 = "0i5j7h7h6ssrwhll0sfhymisshg54kx7j45zcqffzjxa0ylvzlm8";
9 };
10
11 buildInputs = [ txt2man makeWrapper ];
12
13 postPatch = "patchShebangs .";
14
15 installPhase = ''
16 mkdir -p "$out/bin"
17 mkdir -p "$out/share/man/man1"
18 install -vD duply "$out/bin"
19 sed -i $out/bin/duply -e "1a \
01c4c5a4 20 export PATH='${stdenv.lib.makeBinPath [ coreutils python3 duplicity gawk gnupg1 bash gnugrep txt2man which ]}'
98de2045
IB
21 " -e "1a \
22 export DUPL_PYTHON_BIN=$(basename ${duplicity}/lib/python*)
23 "
24 "$out/bin/duply" txt2man > "$out/share/man/man1/duply.1"
25 '';
26
27 meta = with stdenv.lib; {
28 description = "Shell front end for the duplicity backup tool";
29 longDescription = ''
30 Duply is a shell front end for the duplicity backup tool
31 http://duplicity.nongnu.org/. It greatly simplifies it's usage by
32 implementing backup job profiles, batch commands and more. Who says
33 secure backups on non-trusted spaces are no child's play?
34 '';
35 homepage = http://duply.net/;
36 license = licenses.gpl2;
37 maintainers = [ maintainers.bjornfor ];
38 platforms = stdenv.lib.platforms.unix;
39 };
40}