uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
37
pkgs/os-specific/linux/earlyoom/default.nix
Normal file
37
pkgs/os-specific/linux/earlyoom/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pandoc, installShellFiles, withManpage ? false, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "earlyoom";
|
||||
version = "1.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rfjakob";
|
||||
repo = "earlyoom";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-8YcT1TTlAet7F1U9Ginda4IApNqkudegOXqm8rnRGfc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = lib.optionals withManpage [ pandoc installShellFiles ];
|
||||
|
||||
patches = [ ./fix-dbus-path.patch ];
|
||||
|
||||
makeFlags = [ "VERSION=${version}" ];
|
||||
|
||||
installPhase = ''
|
||||
install -D earlyoom $out/bin/earlyoom
|
||||
'' + lib.optionalString withManpage ''
|
||||
installManPage earlyoom.1
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) earlyoom;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Early OOM Daemon for Linux";
|
||||
homepage = "https://github.com/rfjakob/earlyoom";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [];
|
||||
};
|
||||
}
|
||||
11
pkgs/os-specific/linux/earlyoom/fix-dbus-path.patch
Normal file
11
pkgs/os-specific/linux/earlyoom/fix-dbus-path.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue