2022-06-16 17:23:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gettext
|
|
|
|
, pkg-config
|
|
|
|
, vala
|
|
|
|
, which
|
|
|
|
, gtk3
|
|
|
|
, json-glib
|
|
|
|
, libgee
|
2022-07-14 12:49:19 +00:00
|
|
|
, util-linux
|
2022-06-16 17:23:12 +00:00
|
|
|
, vte
|
2022-08-12 12:06:08 +00:00
|
|
|
, xapp
|
2022-06-16 17:23:12 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "timeshift";
|
2022-12-02 08:20:57 +00:00
|
|
|
version = "22.11.1";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "linuxmint";
|
|
|
|
repo = "timeshift";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = version;
|
2022-12-02 08:20:57 +00:00
|
|
|
sha256 = "JYYiqJzLszaCJSl7fDb9Oz8tdIYAnqEbJoRg4zw3wbg=";
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./timeshift-launcher.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
while IFS="" read -r -d $'\0' FILE; do
|
|
|
|
substituteInPlace "$FILE" \
|
2022-07-14 12:49:19 +00:00
|
|
|
--replace "/sbin/blkid" "${util-linux}/bin/blkid"
|
2022-06-16 17:23:12 +00:00
|
|
|
done < <(find ./src -mindepth 1 -name "*.vala" -type f -print0)
|
|
|
|
substituteInPlace ./src/Utility/IconManager.vala \
|
|
|
|
--replace "/usr/share" "$out/share"
|
|
|
|
substituteInPlace ./src/Core/Main.vala \
|
|
|
|
--replace "/etc/timeshift/default.json" "$out/etc/timeshift/default.json" \
|
|
|
|
--replace "file_copy(app_conf_path_default, app_conf_path);" "if (!dir_exists(file_parent(app_conf_path))){dir_create(file_parent(app_conf_path));};file_copy(app_conf_path_default, app_conf_path);"
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
gettext
|
|
|
|
pkg-config
|
|
|
|
vala
|
|
|
|
which
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
json-glib
|
|
|
|
libgee
|
|
|
|
vte
|
2022-08-12 12:06:08 +00:00
|
|
|
xapp
|
2022-06-16 17:23:12 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=( \
|
|
|
|
"-C" "src" \
|
|
|
|
"prefix=$out" \
|
|
|
|
"sysconfdir=$out/etc" \
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A system restore tool for Linux";
|
|
|
|
longDescription = ''
|
|
|
|
TimeShift creates filesystem snapshots using rsync+hardlinks or BTRFS snapshots.
|
|
|
|
Snapshots can be restored using TimeShift installed on the system or from Live CD or USB.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/linuxmint/timeshift";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.linux;
|
2022-11-02 22:02:43 +00:00
|
|
|
maintainers = with maintainers; [ ShamrockLee bobby285271 ];
|
2022-06-16 17:23:12 +00:00
|
|
|
};
|
|
|
|
}
|