From 290030cafc4c31e48d3997bcae8c44896277ab44 Mon Sep 17 00:00:00 2001 From: FliegendeWurst Date: Fri, 17 Jan 2025 21:29:18 +0100 Subject: [PATCH] hyp2mat: fix cross build --- pkgs/by-name/hy/hyp2mat/package.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/hy/hyp2mat/package.nix b/pkgs/by-name/hy/hyp2mat/package.nix index a09766c38a1d..5e92f8b4eee6 100644 --- a/pkgs/by-name/hy/hyp2mat/package.nix +++ b/pkgs/by-name/hy/hyp2mat/package.nix @@ -12,6 +12,7 @@ pkg-config, libpng, zlib, + buildPackages, }: stdenv.mkDerivation rec { @@ -25,8 +26,24 @@ stdenv.mkDerivation rec { sha256 = "03ibk51swxfl7pfrhcrfiffdi4mnf8kla0g1xj1lsrvrjwapfx03"; }; + postPatch = '' + substituteInPlace doc/Makefile.am --replace-fail \ + '$(HELP2MAN) --output=$@ --no-info --include=$< $(PROGNAME)' \ + '$(HELP2MAN) --output=$@ --no-info --include=$< ${ + if stdenv.buildPlatform.canExecute stdenv.hostPlatform then + (placeholder "out") + else + buildPackages.hyp2mat + }/bin/`basename $(PROGNAME)`' + ''; + nativeBuildInputs = [ autoreconfHook + bison + flex + gengetopt + groff + help2man pkg-config ]; @@ -34,11 +51,6 @@ stdenv.mkDerivation rec { libharu libpng zlib - bison - flex - gengetopt - help2man - groff ]; configureFlags = [ "--enable-library" ];