aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/libchop
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-08-11 20:32:32 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2020-09-12 23:04:45 +0200
commit0841c6a1d972a127c84bffc1cce22e824373b914 (patch)
tree679234a7b2d894f81ea47cd5a0c581ddcf7d1942 /pkgs/development/libraries/libchop
parent4f0b106aee47e185ccc4cf0ae14705c59e466c9a (diff)
libchop: fix build w/glibc-2.32
Diffstat (limited to 'pkgs/development/libraries/libchop')
-rw-r--r--pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch41
-rw-r--r--pkgs/development/libraries/libchop/default.nix11
2 files changed, 48 insertions, 4 deletions
diff --git a/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch b/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch
new file mode 100644
index 000000000000..f5a016f63ac3
--- /dev/null
+++ b/pkgs/development/libraries/libchop/0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch
@@ -0,0 +1,41 @@
+From 86fd3be1d31d2e7c09603aa3a8966537ac01bb07 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Tue, 11 Aug 2020 20:30:16 +0200
+Subject: [PATCH] Fix RPC compilation when using libtirpc rather than glibc
+
+---
+ src/block-server.c | 3 +++
+ utils/chop-block-server.c | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/block-server.c b/src/block-server.c
+index 3f97417..29b299e 100644
+--- a/src/block-server.c
++++ b/src/block-server.c
+@@ -18,6 +18,9 @@
+
+ /* Server-side stubs. */
+
++#include <rpc/types.h>
++#include <rpc/xdr.h>
++#include <rpc/auth.h>
+ #include <rpc/svc.h>
+ #include <chop/block-server.h>
+
+diff --git a/utils/chop-block-server.c b/utils/chop-block-server.c
+index a2076c0..9462f5d 100644
+--- a/utils/chop-block-server.c
++++ b/utils/chop-block-server.c
+@@ -19,6 +19,9 @@
+ store, e.g. a GDBM block store, and serves it remotely. A lot of code is
+ borrowed from `chop-archiver.c'. */
+
++#include <rpc/types.h>
++#include <rpc/xdr.h>
++#include <rpc/auth.h>
+ #include <chop/chop-config.h>
+
+ #include <alloca.h>
+--
+2.25.4
+
diff --git a/pkgs/development/libraries/libchop/default.nix b/pkgs/development/libraries/libchop/default.nix
index 190f122ecfa7..d2040b72311c 100644
--- a/pkgs/development/libraries/libchop/default.nix
+++ b/pkgs/development/libraries/libchop/default.nix
@@ -1,6 +1,6 @@
{ fetchurl, stdenv, zlib, bzip2, libgcrypt
, gdbm, gperf, tdb, gnutls, db, libuuid
-, lzo, pkgconfig, guile
+, lzo, pkgconfig, guile, rpcsvc-proto, libtirpc
}:
stdenv.mkDerivation rec {
@@ -11,16 +11,19 @@ stdenv.mkDerivation rec {
sha256 = "0fpdyxww41ba52d98blvnf543xvirq1v9xz1i3x1gm9lzlzpmc2g";
};
- patches = [ ./gets-undeclared.patch ./size_t.patch ];
+ patches = [ ./gets-undeclared.patch ./size_t.patch ./0001-Fix-RPC-compilation-when-using-libtirpc-rather-than-.patch ];
- nativeBuildInputs = [ pkgconfig gperf ];
+ nativeBuildInputs = [ pkgconfig gperf rpcsvc-proto ];
+
+ NIX_CFLAGS_COMPILE = [ "-I${libtirpc.dev}/include/tirpc" ];
+ NIX_LDFLAGS = [ "-ltirpc" ];
buildInputs =
[ zlib bzip2 lzo
libgcrypt
gdbm db tdb
gnutls libuuid
- guile
+ guile libtirpc
];
doCheck = false;