diff --git a/pkgs/development/libraries/hamlib/default.nix b/pkgs/development/libraries/hamlib/default.nix index cd56b04c0346..31b620ae5d2e 100644 --- a/pkgs/development/libraries/hamlib/default.nix +++ b/pkgs/development/libraries/hamlib/default.nix @@ -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" ];