Unverified Commit 301d6e45 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

hyp2mat: fix cross build (#375019)

parents 512432dc 290030ca
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -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" ];