diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libdaemon')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libdaemon/default.nix | 28 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch | 13 |
2 files changed, 41 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libdaemon/default.nix b/nixpkgs/pkgs/development/libraries/libdaemon/default.nix new file mode 100644 index 000000000000..112792454c43 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libdaemon/default.nix @@ -0,0 +1,28 @@ +{lib, stdenv, fetchurl}: + +stdenv.mkDerivation rec { + pname = "libdaemon"; + version = "0.14"; + + src = fetchurl { + url = "http://0pointer.de/lennart/projects/libdaemon/${pname}-${version}.tar.gz"; + sha256 = "0d5qlq5ab95wh1xc87rqrh1vx6i8lddka1w3f1zcqvcqdxgyn8zx"; + }; + + outputs = [ "out" "dev" "doc" ]; + + patches = [ ./fix-includes.patch ]; + + configureFlags = [ "--disable-lynx" ] + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) + [ # Can't run this test while cross-compiling + "ac_cv_func_setpgrp_void=yes" + ]; + + meta = { + description = "Lightweight C library that eases the writing of UNIX daemons"; + homepage = "http://0pointer.de/lennart/projects/libdaemon/"; + license = lib.licenses.lgpl2Plus; + platforms = lib.platforms.unix; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch b/nixpkgs/pkgs/development/libraries/libdaemon/fix-includes.patch new file mode 100644 index 000000000000..51c5133afede --- /dev/null +++ b/nixpkgs/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 <signal.h> + #include <errno.h> + #include <string.h> ++#include <unistd.h> + #include <sys/types.h> + #include <sys/time.h> +-#include <sys/unistd.h> + #include <sys/select.h> + + #include <libdaemon/dfork.h> |