about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/hamlib
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hamlib')
-rw-r--r--nixpkgs/pkgs/development/libraries/hamlib/default.nix17
1 files changed, 12 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/libraries/hamlib/default.nix b/nixpkgs/pkgs/development/libraries/hamlib/default.nix
index cd56b04c0346..31b620ae5d2e 100644
--- a/nixpkgs/pkgs/development/libraries/hamlib/default.nix
+++ b/nixpkgs/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" ];