@@ -1,4 +1,4 @@
1−{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig
1+{ stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxPackages
22, withGUI ? false , qt4 ? null}:
33
44# libX11 is needed because the Qt build stuff automatically adds `-lX11'.
@@ -12,10 +12,14 @@ stdenv.mkDerivation rec {
1212 sha256 = "0nn4wfvwy4nii25y6lwlrnzx9ah4nz0r93yk7hswiy6wxjs10wc4";
1313 };
1414
15− buildInputs = [ binutils zlib popt pkgconfig ]
15+ buildInputs = [ binutils zlib popt pkgconfig linuxPackages.kernelHeaders ]
1616 ++ stdenv.lib.optionals withGUI [ qt4 ];
1717
1818 configureFlags = [
19+ "--build ${stdenv.system}"
20+ "--host ${stdenv.system}"
21+ "--target ${stdenv.system}"
22+ "--with-kernel=${linuxPackages.kernelHeaders}"
1923 "--disable-shared" # needed because only the static libbfd is available
2024 ]
2125 ++ stdenv.lib.optional withGUI "--with-qt-dir=${qt4} --enable-gui=qt4";