Compare commits

...

2 commits

Author SHA1 Message Date
6249738563 Flake: add anything-sync-daemon package 2023-10-18 21:05:48 +02:00
6f7f8c5521 Gaming: install prism launcher 2023-10-18 12:13:21 +02:00
4 changed files with 81 additions and 0 deletions

View file

@ -66,6 +66,7 @@ outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-
packages = { packages = {
x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; { x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; {
pseint = callPackage ./pkgs/pseint.nix {}; pseint = callPackage ./pkgs/pseint.nix {};
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
}; };
}; };
nixosConfigurations = { nixosConfigurations = {

View file

@ -0,0 +1,56 @@
{ stdenv
, lib
, fetchFromGitHub
, makeWrapper
, rsync
, gawk
, pv
, gnutar
, zstd
, util-linux
, coreutils
, gnugrep
, findutils
}:
stdenv.mkDerivation rec {
pname = "anything-sync-daemon";
version = "6.0.0";
src = fetchFromGitHub {
owner = "graysky2";
repo = pname;
rev = "v${version}";
hash = "sha256-6nfaAMH5YgK6gimuZ8j1zWLTDOi11KIwW7Bf0Iwh7+I=";
};
patches = [ ./disableDaemonStopTargets.patch ];
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
substituteInPlace init/asd* \
--replace /usr/bin/anything-sync-daemon $out/bin/anything-sync-daemon
'';
enableParallelBuilding = true;
makeFlags = [
"DESTDIR=${placeholder "out"}"
"PREFIX="
"INITDIR_SYSTEMD=/lib/systemd/system"
];
installTargets = [ "install-systemd-all" ];
postInstall = ''
wrapProgram $out/bin/anything-sync-daemon \
--suffix PATH : ${lib.makeBinPath [ rsync gawk pv gnutar zstd util-linux coreutils gnugrep findutils]}
'';
meta = with lib; {
description = "Symlinks and syncs user specified dirs to RAM";
homepage = "https://github.com/graysky2/anything-sync-daemon/";
license = lib.licenses.mit;
platforms = platforms.linux;
};
}

View file

@ -0,0 +1,23 @@
diff --git a/Makefile b/Makefile
index ddf2d73..827ea8f 100644
--- a/Makefile
+++ b/Makefile
@@ -31,17 +31,7 @@ common/$(PN): Makefile common/$(PN).in
help: install
-stop-asd:
-ifneq ($(PREFIX), /usr)
- sudo -E asd unsync
-endif
-
-disable-systemd:
-ifeq ($(PREFIX), /usr)
- systemctl stop asd asd-resync || /bin/true
-endif
-
-install-bin: stop-asd disable-systemd common/$(PN)
+install-bin: common/$(PN)
$(Q)echo -e '\033[1;32mInstalling main script...\033[0m'
$(INSTALL_DIR) "$(DESTDIR)$(BINDIR)"
$(INSTALL_PROGRAM) common/$(PN) "$(DESTDIR)$(BINDIR)/$(PN)"

View file

@ -8,5 +8,6 @@
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
heroic heroic
prismlauncher-qt5
]; ];
} }