diff --git a/pkgs/by-name/ea/earlyoom/0000-fix-dbus-path.patch b/pkgs/by-name/ea/earlyoom/0000-fix-dbus-path.patch index e1c10cf82f96..2b9e45dfb1c9 100644 --- a/pkgs/by-name/ea/earlyoom/0000-fix-dbus-path.patch +++ b/pkgs/by-name/ea/earlyoom/0000-fix-dbus-path.patch @@ -1,11 +1,10 @@ --- a/kill.c +++ b/kill.c -@@ -55,7 +55,7 @@ static void notify(const char* summary, const char* body) - } - // Complete command line looks like this: - // dbus-send --system / net.nuetzlich.SystemNotifications.Notify 'string:summary text' 'string:and body text' -- execl("/usr/bin/dbus-send", "dbus-send", "--system", "/", "net.nuetzlich.SystemNotifications.Notify", -+ execlp("dbus-send", "dbus-send", "--system", "/", "net.nuetzlich.SystemNotifications.Notify", - summary2, body2, NULL); - warn("notify: exec failed: %s\n", strerror(errno)); - exit(1); +@@ -175,7 +175,7 @@ static void notify_dbus(const char* body) + body2, + NULL + }; +- const char* dbus_send_path = "/usr/bin/dbus-send"; ++ const char* dbus_send_path = "dbus-send"; + notify_spawn_subprocess(dbus_send_path, argv, NULL, 0); + } diff --git a/pkgs/by-name/ea/earlyoom/package.nix b/pkgs/by-name/ea/earlyoom/package.nix index 442632cd4914..da6c2719ad25 100644 --- a/pkgs/by-name/ea/earlyoom/package.nix +++ b/pkgs/by-name/ea/earlyoom/package.nix @@ -4,7 +4,6 @@ pandoc, stdenv, nixosTests, - fetchpatch, # The man page requires pandoc to build and resides in a separate "man" # output which is pulled in on-demand. There is no need to disabled it unless # pandoc is hard to build on your platform. @@ -13,36 +12,26 @@ stdenv.mkDerivation (finalAttrs: { pname = "earlyoom"; - version = "1.8.2"; + version = "1.9.0"; src = fetchFromGitHub { owner = "rfjakob"; repo = "earlyoom"; rev = "v${finalAttrs.version}"; - hash = "sha256-HZ7llMNdx2u1a6loIFjXt5QNkYpJp8GqLKxDf9exuzE="; + hash = "sha256-eNWg96+uQn/s+iBCm8TH26pXVVzBdqbeQxVP2t4W7YA="; }; outputs = [ "out" ] ++ lib.optionals withManpage [ "man" ]; - patches = [ - ./0000-fix-dbus-path.patch - # Respect `MANDIR`. - (fetchpatch { - url = "https://github.com/rfjakob/earlyoom/commit/c5a1799a5ff4b3fd3132d50a510e8c126933cf4a.patch"; - hash = "sha256-64AkpTMmjiqZ6Byq6687zNIqrQ/IGRGgzzjyyAfcg14="; - }) - # Correctly handle `PREFIX` as a default rather than always-concatenate. - (fetchpatch { - url = "https://github.com/rfjakob/earlyoom/commit/f7d6f1cc925962fbdcf57b1c2aeeabbf11e2d542.patch"; - hash = "sha256-DJDeQzcEGJMoMGIi1D/ogMaKG1VQvPZN9jXtUDGjyjk="; - }) - ]; + patches = [ ./0000-fix-dbus-path.patch ]; nativeBuildInputs = lib.optionals withManpage [ pandoc ]; makeFlags = [ "VERSION=${finalAttrs.version}" "PREFIX=${placeholder "out"}" + "SYSCONFDIR=${placeholder "out"}/etc" + "SYSTEMDUNITDIR=${placeholder "out"}/etc/systemd/system" ] ++ lib.optional withManpage "MANDIR=${placeholder "man"}/share/man";