earlyoom: 1.8.2 -> 1.9.0 (#483412)

This commit is contained in:
Gergő Gutyina
2026-01-31 13:30:14 +00:00
committed by GitHub
2 changed files with 13 additions and 25 deletions
@@ -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);
}
+5 -16
View File
@@ -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";