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

38 lines
1.4 KiB
Nix
Raw Normal View History

2018-04-07 18:42:38 +01:00
{ stdenv, fetchzip, mono, sqlite, makeWrapper }:
stdenv.mkDerivation rec {
pname = "duplicati";
2019-06-21 16:48:02 +01:00
version = "2.0.4.5";
2018-04-07 18:42:38 +01:00
channel = "beta";
2019-06-21 16:48:02 +01:00
build_date = "2018-11-28";
2018-04-07 18:42:38 +01:00
src = fetchzip {
url = "https://github.com/duplicati/duplicati/releases/download/v${version}-${version}_${channel}_${build_date}/duplicati-${version}_${channel}_${build_date}.zip";
2019-06-21 16:48:02 +01:00
sha256 = "118rhzm8vk1092214vq7kxnmrnz4jl32lk8j90965a8pg05m53gn";
2018-04-07 18:42:38 +01:00
stripRoot = false;
};
buildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/{bin,share/${pname}-${version}}
cp -r * $out/share/${pname}-${version}
2018-04-07 18:42:38 +01:00
makeWrapper "${mono}/bin/mono" $out/bin/duplicati-cli \
--add-flags "$out/share/${pname}-${version}/Duplicati.CommandLine.exe" \
2018-04-07 18:42:38 +01:00
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [
sqlite ]}
makeWrapper "${mono}/bin/mono" $out/bin/duplicati-server \
--add-flags "$out/share/${pname}-${version}/Duplicati.Server.exe" \
2018-04-07 18:42:38 +01:00
--prefix LD_LIBRARY_PATH : ${stdenv.lib.makeLibraryPath [
sqlite ]}
'';
meta = with stdenv.lib; {
description = "A free backup client that securely stores encrypted, incremental, compressed backups on cloud storage services and remote file servers";
homepage = https://www.duplicati.com/;
license = licenses.lgpl21;
maintainers = with maintainers; [ nyanloutre ];
platforms = platforms.all;
};
}