mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 14:41:17 +00:00
hamlib: support cross-compilation, cleanup
unfortunately, this disables perl bindings, but at least it compiles now - remove ExtUtilsMakeMaker, doesn't make a difference in the output - enable strictDeps
This commit is contained in:
parent
ac96a27f7a
commit
e148619e37
|
@ -15,7 +15,8 @@
|
|||
, perlPackages
|
||||
, pythonBindings ? true
|
||||
, tclBindings ? true
|
||||
, perlBindings ? true
|
||||
, perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform
|
||||
, buildPackages
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
@ -27,11 +28,15 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
nativeBuildInputs = [
|
||||
swig
|
||||
pkg-config
|
||||
libtool
|
||||
];
|
||||
] ++ lib.optionals pythonBindings [ python3 ]
|
||||
++ lib.optionals tclBindings [ tcl ]
|
||||
++ lib.optionals perlBindings [ perl ];
|
||||
|
||||
buildInputs = [
|
||||
gd
|
||||
|
@ -39,10 +44,12 @@ stdenv.mkDerivation rec {
|
|||
libusb-compat-0_1
|
||||
boost
|
||||
] ++ lib.optionals pythonBindings [ python3 ncurses ]
|
||||
++ lib.optionals tclBindings [ tcl ]
|
||||
++ lib.optionals perlBindings [ perl perlPackages.ExtUtilsMakeMaker ];
|
||||
++ lib.optionals tclBindings [ tcl ];
|
||||
|
||||
configureFlags = lib.optionals perlBindings [ "--with-perl-binding" ]
|
||||
|
||||
configureFlags = [
|
||||
"CC_FOR_BUILD=${stdenv.cc.targetPrefix}cc"
|
||||
] ++ lib.optionals perlBindings [ "--with-perl-binding" ]
|
||||
++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
|
||||
++ lib.optionals pythonBindings [ "--with-python-binding" ];
|
||||
|
||||
|
|
Loading…
Reference in a new issue