Compare commits
2 commits
a11a7598fc
...
6249738563
| Author | SHA1 | Date | |
|---|---|---|---|
| 6249738563 | |||
| 6f7f8c5521 |
4 changed files with 81 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, home-manager-
|
|||
packages = {
|
||||
x86_64-linux = with import nixpkgs-unstable { system = "x86_64-linux"; }; {
|
||||
pseint = callPackage ./pkgs/pseint.nix {};
|
||||
anything-sync-daemon = callPackage ./pkgs/anything-sync-daemon {};
|
||||
};
|
||||
};
|
||||
nixosConfigurations = {
|
||||
|
|
|
|||
56
pkgs/anything-sync-daemon/default.nix
Normal file
56
pkgs/anything-sync-daemon/default.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
23
pkgs/anything-sync-daemon/disableDaemonStopTargets.patch
Normal file
23
pkgs/anything-sync-daemon/disableDaemonStopTargets.patch
Normal 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)"
|
||||
|
|
@ -8,5 +8,6 @@
|
|||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
heroic
|
||||
prismlauncher-qt5
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue