From 0153599164e7ef2266c9de4979369daadb3a3cad Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 27 May 2017 18:40:27 -0500 Subject: [PATCH] libdaemon: Add patch to fix musl build --- pkgs/development/libraries/libdaemon/default.nix | 8 ++++++-- .../libraries/libdaemon/fix-includes.patch | 13 +++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/libdaemon/fix-includes.patch diff --git a/pkgs/development/libraries/libdaemon/default.nix b/pkgs/development/libraries/libdaemon/default.nix index af832a70a73b..59e576fd3923 100644 --- a/pkgs/development/libraries/libdaemon/default.nix +++ b/pkgs/development/libraries/libdaemon/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (rec { name = "libdaemon-0.14"; src = fetchurl { @@ -24,4 +24,8 @@ stdenv.mkDerivation rec { platforms = stdenv.lib.platforms.unix; maintainers = [ ]; }; -} +} // stdenv.lib.optionalAttrs stdenv.hostPlatform.isMusl { + # This patch should be applied unconditionally, but doing so will cause mass rebuild. + patches = ./fix-includes.patch; +}) + diff --git a/pkgs/development/libraries/libdaemon/fix-includes.patch b/pkgs/development/libraries/libdaemon/fix-includes.patch new file mode 100644 index 000000000000..51c5133afede --- /dev/null +++ b/pkgs/development/libraries/libdaemon/fix-includes.patch @@ -0,0 +1,13 @@ +--- libdaemon-0.14.orig/examples/testd.c ++++ libdaemon-0.14/examples/testd.c +@@ -21,9 +21,9 @@ + #include + #include + #include ++#include + #include + #include +-#include + #include + + #include