w3m: fix cross-build
This commit is contained in:
parent
629d011cea
commit
999387d718
|
@ -4,7 +4,7 @@
|
||||||
, graphicsSupport ? true, imlib2 ? null
|
, graphicsSupport ? true, imlib2 ? null
|
||||||
, x11Support ? graphicsSupport, libX11 ? null
|
, x11Support ? graphicsSupport, libX11 ? null
|
||||||
, mouseSupport ? !stdenv.isDarwin, gpm-ncurses ? null
|
, mouseSupport ? !stdenv.isDarwin, gpm-ncurses ? null
|
||||||
, perl, man, pkgconfig
|
, perl, man, pkgconfig, buildPackages, w3m
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert sslSupport -> openssl != null;
|
assert sslSupport -> openssl != null;
|
||||||
|
@ -14,7 +14,17 @@ assert mouseSupport -> gpm-ncurses != null;
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
let
|
||||||
|
mktable = buildPackages.stdenv.mkDerivation rec {
|
||||||
|
name = "w3m-mktable";
|
||||||
|
inherit (w3m) src;
|
||||||
|
nativeBuildInputs = [ pkgconfig boehmgc ];
|
||||||
|
makeFlags = [ "mktable" ];
|
||||||
|
installPhase = ''
|
||||||
|
install -D mktable $out/bin/mktable
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in stdenv.mkDerivation rec {
|
||||||
name = "w3m-0.5.3+git20180125";
|
name = "w3m-0.5.3+git20180125";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
|
@ -31,6 +41,8 @@ stdenv.mkDerivation rec {
|
||||||
PERL = "${perl}/bin/perl";
|
PERL = "${perl}/bin/perl";
|
||||||
MAN = "${man}/bin/man";
|
MAN = "${man}/bin/man";
|
||||||
|
|
||||||
|
makeFlags = [ "AR=${stdenv.cc.bintools.targetPrefix}ar" ];
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./RAND_egd.libressl.patch
|
./RAND_egd.libressl.patch
|
||||||
(fetchpatch {
|
(fetchpatch {
|
||||||
|
@ -40,8 +52,14 @@ stdenv.mkDerivation rec {
|
||||||
})
|
})
|
||||||
] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ];
|
] ++ optional (graphicsSupport && !x11Support) [ ./no-x11.patch ];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
postPatch = optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
|
||||||
buildInputs = [ ncurses boehmgc gettext zlib ]
|
ln -s ${mktable}/bin/mktable mktable
|
||||||
|
# stop make from recompiling mktable
|
||||||
|
sed -ie 's!mktable.*:.*!mktable:!' Makefile.in
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkgconfig gettext ];
|
||||||
|
buildInputs = [ ncurses boehmgc zlib ]
|
||||||
++ optional sslSupport openssl
|
++ optional sslSupport openssl
|
||||||
++ optional mouseSupport gpm-ncurses
|
++ optional mouseSupport gpm-ncurses
|
||||||
++ optional graphicsSupport imlib2
|
++ optional graphicsSupport imlib2
|
||||||
|
|
Loading…
Reference in New Issue