Skip to content

Commit 301d6e4

Browse files
hyp2mat: fix cross build (NixOS#375019)
2 parents 512432d + 290030c commit 301d6e4

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

pkgs/by-name/hy/hyp2mat/package.nix

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
pkg-config,
1313
libpng,
1414
zlib,
15+
buildPackages,
1516
}:
1617

1718
stdenv.mkDerivation rec {
@@ -25,20 +26,31 @@ stdenv.mkDerivation rec {
2526
sha256 = "03ibk51swxfl7pfrhcrfiffdi4mnf8kla0g1xj1lsrvrjwapfx03";
2627
};
2728

29+
postPatch = ''
30+
substituteInPlace doc/Makefile.am --replace-fail \
31+
'$(HELP2MAN) --output=$@ --no-info --include=$< $(PROGNAME)' \
32+
'$(HELP2MAN) --output=$@ --no-info --include=$< ${
33+
if stdenv.buildPlatform.canExecute stdenv.hostPlatform then
34+
(placeholder "out")
35+
else
36+
buildPackages.hyp2mat
37+
}/bin/`basename $(PROGNAME)`'
38+
'';
39+
2840
nativeBuildInputs = [
2941
autoreconfHook
42+
bison
43+
flex
44+
gengetopt
45+
groff
46+
help2man
3047
pkg-config
3148
];
3249

3350
buildInputs = [
3451
libharu
3552
libpng
3653
zlib
37-
bison
38-
flex
39-
gengetopt
40-
help2man
41-
groff
4254
];
4355

4456
configureFlags = [ "--enable-library" ];

0 commit comments

Comments
 (0)