nixpkgs/pkgs/by-name/pr/profile-sync-daemon/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.6 KiB
Nix

{ lib, stdenv, fetchFromGitHub, util-linux, coreutils }:
stdenv.mkDerivation rec {
pname = "profile-sync-daemon";
version = "6.50";
src = fetchFromGitHub {
owner = "graysky2";
repo = "profile-sync-daemon";
rev = "v${version}";
hash = "sha256-Wb9YLxuu9i9s/Y6trz5NZDU9WRywe3138cp5Q2gWbxM=";
};
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 \
--replace "PATH=/usr/bin:/bin" "PATH=${util-linux.bin}/bin:${coreutils}/bin" \
--replace "sudo " "/run/wrappers/bin/sudo "
'';
meta = with lib; {
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;
};
}