about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ti-rpc
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/development/libraries/ti-rpc
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-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/ti-rpc')
-rw-r--r--nixpkgs/pkgs/development/libraries/ti-rpc/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix b/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix
new file mode 100644
index 000000000000..d67d76185745
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ti-rpc/default.nix
@@ -0,0 +1,53 @@
+{ fetchurl, stdenv, autoreconfHook, libkrb5 }:
+
+stdenv.mkDerivation rec {
+  name = "libtirpc-1.1.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/libtirpc/${name}.tar.bz2";
+    sha256 = "07anqypf7c719x9y683qz65cxllmzlgmlab2hlahrqcj4bq2k99c";
+  };
+
+  outputs = [ "out" "dev" ];
+
+  postPatch = ''
+    sed '1i#include <stdint.h>' -i src/xdr_sizeof.c
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    substituteInPlace tirpc/rpc/types.h \
+      --replace '#if defined __APPLE_CC__ || defined __FreeBSD__' \
+                '#if defined __APPLE_CC__ || defined __FreeBSD__ || !defined __GLIBC__'
+  '';
+
+  KRB5_CONFIG = "${libkrb5.dev}/bin/krb5-config";
+  nativeBuildInputs = [ autoreconfHook ];
+  propagatedBuildInputs = [ libkrb5 ];
+
+  preConfigure = ''
+    sed -es"|/etc/netconfig|$out/etc/netconfig|g" -i doc/Makefile.in tirpc/netconfig.h
+  '';
+
+  preInstall = "mkdir -p $out/etc";
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = https://sourceforge.net/projects/libtirpc/;
+    description = "The transport-independent Sun RPC implementation (TI-RPC)";
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ abbradar ];
+    longDescription = ''
+       Currently, NFS commands use the SunRPC routines provided by the
+       glibc.  These routines do not support IPv6 addresses.  Ulrich
+       Drepper, who is the maintainer of the glibc, refuses any change in
+       the glibc concerning the RPC.  He wants the RPC to become a separate
+       library.  Other OS (NetBSD, FreeBSD, Solarix, HP-UX, AIX) have
+       migrated their SunRPC library to a TI-RPC (Transport Independent
+       RPC) implementation.  This implementation allows the support of
+       other transports than UDP and TCP over IPv4.  FreeBSD provides a
+       TI-RPC library ported from NetBSD with improvements.  This library
+       already supports IPv6.  So, the FreeBSD release 5.2.1 TI-RPC has
+       been ported to replace the SunRPC of the glibc.
+    '';
+  };
+}