2021-10-14 00:43:12 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, util-linux, coreutils }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "profile-sync-daemon";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "6.48";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "graysky2";
|
|
|
|
repo = "profile-sync-daemon";
|
|
|
|
rev = "v${version}";
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-EHzRuE24Bj+lqRiPTCAPEAV4zVMK8iW2cF6OgO1izZw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
PREFIX=\"\" DESTDIR=$out make install
|
|
|
|
substituteInPlace $out/bin/profile-sync-daemon \
|
|
|
|
--replace "/usr/" "$out/" \
|
|
|
|
--replace "sudo " "/run/wrappers/bin/sudo "
|
|
|
|
# $HOME detection fails (and is unnecessary)
|
|
|
|
sed -i '/^HOME/d' $out/bin/profile-sync-daemon
|
|
|
|
substituteInPlace $out/bin/psd-overlay-helper \
|
2020-11-24 20:58:05 +00:00
|
|
|
--replace "PATH=/usr/bin:/bin" "PATH=${util-linux.bin}/bin:${coreutils}/bin" \
|
|
|
|
--replace "sudo " "/run/wrappers/bin/sudo "
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Syncs browser profile dirs to RAM";
|
|
|
|
longDescription = ''
|
|
|
|
Profile-sync-daemon (psd) is a tiny pseudo-daemon designed to manage your
|
|
|
|
browser's profile in tmpfs and to periodically sync it back to your
|
|
|
|
physical disc (HDD/SSD). This is accomplished via a symlinking step and
|
|
|
|
an innovative use of rsync to maintain back-up and synchronization
|
|
|
|
between the two. One of the major design goals of psd is a completely
|
|
|
|
transparent user experience.
|
|
|
|
'';
|
|
|
|
homepage = "https://github.com/graysky2/profile-sync-daemon";
|
|
|
|
downloadPage = "https://github.com/graysky2/profile-sync-daemon/releases";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = [ maintainers.prikhi ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|