From 3e1f698acdef470ba557bbda902a890bdec962e9 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 23 Apr 2018 14:24:55 -0500 Subject: [PATCH] nfs-utils: patch to fix w/musl --- pkgs/os-specific/linux/nfs-utils/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index 904dae55c9c..359d1869084 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap +{ stdenv, fetchurl, fetchpatch, lib, pkgconfig, utillinux, libcap, libtirpc, libevent, libnfsidmap , sqlite, kerberos, kmod, libuuid, keyutils, lvm2, systemd, coreutils, tcp_wrappers , buildEnv }: @@ -39,6 +39,18 @@ in stdenv.mkDerivation rec { ] ++ lib.optional (stdenv ? glibc) "--with-rpcgen=${stdenv.glibc.bin}/bin/rpcgen"; + patches = lib.optionals stdenv.hostPlatform.isMusl [ + (fetchpatch { + url = "https://raw.githubusercontent.com/alpinelinux/aports/cb880042d48d77af412d4688f24b8310ae44f55f/main/nfs-utils/0011-exportfs-only-do-glibc-specific-hackery-on-glibc.patch"; + sha256 = "0rrddrykz8prk0dcgfvmnz0vxn09dbgq8cb098yjjg19zz6d7vid"; + }) + # http://openwall.com/lists/musl/2015/08/18/10 + (fetchpatch { + url = "https://raw.githubusercontent.com/alpinelinux/aports/cb880042d48d77af412d4688f24b8310ae44f55f/main/nfs-utils/musl-getservbyport.patch"; + sha256 = "1fqws9dz8n1d9a418c54r11y3w330qgy2652dpwcy96cm44sqyhf"; + }) + ]; + postPatch = '' patchShebangs tests