rpcsvc-proto: fix cross-compilation

Tested pkgsCross.armv7l-hf-multiplatform.rpvscv-proto
This commit is contained in:
Daniel Fullmer 2020-10-20 22:09:41 -07:00
parent 4fb4b69d9b
commit 91493dfd8a

View File

@ -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";