depot/pkgs/applications/networking/sync/backintime/common.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

56 lines
1.6 KiB
Nix

{stdenv, lib, fetchFromGitHub, makeWrapper, gettext,
python3, rsync, cron, openssh, sshfs-fuse, encfs }:
let
python' = python3.withPackages (ps: with ps; [ dbus-python keyring packaging ]);
apps = lib.makeBinPath [ openssh python' cron rsync sshfs-fuse encfs ];
in stdenv.mkDerivation rec {
pname = "backintime-common";
version = "1.5.2";
src = fetchFromGitHub {
owner = "bit-team";
repo = "backintime";
rev = "v${version}";
sha256 = "sha256-yfCSTzCmhXDBC1vYqwgVjsYUtc5VO1VW74BmIB0hHfE=";
};
nativeBuildInputs = [ makeWrapper gettext ];
buildInputs = [ python' ];
installFlags = [ "DEST=$(out)" ];
configureFlags = [ "--python=${lib.getExe python'}" ];
preConfigure = ''
patchShebangs --build updateversion.sh
cd common
substituteInPlace configure \
--replace-fail "/.." "" \
--replace-fail "share/backintime" "${python'.sitePackages}/backintime"
substituteInPlace "backintime" "backintime-askpass" \
--replace-fail "share" "${python'.sitePackages}"
'';
dontAddPrefix = true;
preFixup = ''
wrapProgram "$out/bin/backintime" \
--prefix PATH : ${apps}
'';
meta = {
homepage = "https://github.com/bit-team/backintime";
description = "Simple backup tool for Linux";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ stephen-huan ];
platforms = lib.platforms.linux;
mainProgram = "backintime";
longDescription = ''
Back In Time is a simple backup tool (on top of rsync) for Linux
inspired from "flyback project" and "TimeVault". The backup is
done by taking snapshots of a specified set of directories.
'';
};
}