From 91493dfd8a7c9381487c4910520d314f92aacd2d Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Tue, 20 Oct 2020 22:09:41 -0700 Subject: [PATCH] rpcsvc-proto: fix cross-compilation Tested pkgsCross.armv7l-hf-multiplatform.rpvscv-proto --- pkgs/tools/misc/rpcsvc-proto/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/rpcsvc-proto/default.nix b/pkgs/tools/misc/rpcsvc-proto/default.nix index 6406b6b20e2c..12885172080c 100644 --- a/pkgs/tools/misc/rpcsvc-proto/default.nix +++ b/pkgs/tools/misc/rpcsvc-proto/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, autoreconfHook }: +{ stdenv, lib, fetchFromGitHub, autoreconfHook, buildPackages }: stdenv.mkDerivation rec { pname = "rpcsvc-proto"; @@ -13,8 +13,14 @@ stdenv.mkDerivation rec { outputs = [ "out" "man" ]; + depsBuildBuild = [ buildPackages.stdenv.cc ]; nativeBuildInputs = [ autoreconfHook ]; + postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) '' + substituteInPlace rpcsvc/Makefile.am \ + --replace '$(top_builddir)/rpcgen/rpcgen' '${buildPackages.rpcsvc-proto}/bin/rpcgen' + ''; + meta = with stdenv.lib; { homepage = "https://github.com/thkukuk/rpcsvc-proto"; description = "This package contains rpcsvc proto.x files from glibc, which are missing in libtirpc";