diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:36 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-01-07 02:18:47 +0000 |
commit | 36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch) | |
tree | b3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/libnsl | |
parent | 4e31070265257dc67d120c27e0f75c2344fdfa9a (diff) | |
parent | abf060725d7614bd3b9f96764262dfbc2f9c2199 (diff) | |
download | nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2 nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip |
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libnsl')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libnsl/cdefs.patch | 30 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libnsl/default.nix | 26 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libnsl/nis_h.patch | 45 |
3 files changed, 101 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libnsl/cdefs.patch b/nixpkgs/pkgs/development/libraries/libnsl/cdefs.patch new file mode 100644 index 000000000000..dbbe800a3479 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libnsl/cdefs.patch @@ -0,0 +1,30 @@ +--- a/src/rpcsvc/nislib.h ++++ b/src/rpcsvc/nislib.h +@@ -19,6 +19,7 @@ + #ifndef __RPCSVC_NISLIB_H__ + #define __RPCSVC_NISLIB_H__ + ++#include <sys/cdefs.h> + #include <features.h> + + __BEGIN_DECLS +--- a/src/rpcsvc/ypclnt.h ++++ b/src/rpcsvc/ypclnt.h +@@ -20,6 +20,7 @@ + #ifndef __RPCSVC_YPCLNT_H__ + #define __RPCSVC_YPCLNT_H__ + ++#include <sys/cdefs.h> + #include <features.h> + + /* Some defines */ +--- a/src/rpcsvc/ypupd.h ++++ b/src/rpcsvc/ypupd.h +@@ -33,6 +33,7 @@ + #ifndef __RPCSVC_YPUPD_H__ + #define __RPCSVC_YPUPD_H__ + ++#include <sys/cdefs.h> + #include <features.h> + + #include <rpc/rpc.h> diff --git a/nixpkgs/pkgs/development/libraries/libnsl/default.nix b/nixpkgs/pkgs/development/libraries/libnsl/default.nix new file mode 100644 index 000000000000..9e8a46b2e6b3 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libnsl/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, libtirpc, pkgconfig }: + +stdenv.mkDerivation rec { + name = "libnsl-${version}"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "thkukuk"; + repo = "libnsl"; + rev = "libnsl-${version}"; + sha256 = "0h8br0gmgw3fp5fmy6bfbj1qlk9hry1ssg25ssjgxbd8spczpscs"; + }; + + nativeBuildInputs = [ autoreconfHook pkgconfig ]; + buildInputs = [ libtirpc ]; + + patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ ./cdefs.patch ./nis_h.patch ]; + + meta = with stdenv.lib; { + description = "Client interface library for NIS(YP) and NIS+"; + homepage = https://github.com/thkukuk/libnsl; + license = licenses.lgpl21; + maintainers = [ maintainers.dezgeg ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/libnsl/nis_h.patch b/nixpkgs/pkgs/development/libraries/libnsl/nis_h.patch new file mode 100644 index 000000000000..199259df2e8d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/libnsl/nis_h.patch @@ -0,0 +1,45 @@ +--- a/src/rpcsvc/nis.h ++++ b/src/rpcsvc/nis.h +@@ -32,6 +32,7 @@ + #ifndef _RPCSVC_NIS_H + #define _RPCSVC_NIS_H 1 + ++#include <sys/cdefs.h> + #include <features.h> + #include <rpc/rpc.h> + #include <rpcsvc/nis_tags.h> +@@ -56,6 +57,34 @@ + * <kukuk@suse.de> + */ + ++#ifndef rawmemchr ++#define rawmemchr(s,c) memchr((s),(size_t)-1,(c)) ++#endif ++ ++#ifndef __asprintf ++#define __asprintf asprintf ++#endif ++ ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++ ++#ifndef __strtok_r ++#define __strtok_r strtok_r ++#endif ++ ++#ifndef __always_inline ++#define __always_inline __attribute__((__always_inline__)) ++#endif ++ ++#ifndef TEMP_FAILURE_RETRY ++#define TEMP_FAILURE_RETRY(exp) ({ \ ++typeof (exp) _rc; \ ++ do { \ ++ _rc = (exp); \ ++ } while (_rc == -1 && errno == EINTR); \ ++ _rc; }) ++#endif + + #ifndef __nis_object_h + #define __nis_object_h |