Skip to content

Commit

Permalink
hamlib_4: fix cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewCroughan committed Dec 8, 2024
1 parent d4ac57d commit ee9d69b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions pkgs/development/libraries/hamlib/4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
, pkg-config
, boost
, libtool
, perlPackages
, pythonBindings ? true
, tclBindings ? true
, perlBindings ? true
, perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform
, buildPackages
}:
let
python3 = python311; # needs distutils and imp
Expand All @@ -29,22 +29,28 @@ stdenv.mkDerivation rec {
sha256 = "sha256-YByJ8y7SJelSet49ZNDQXSMgLAWuIf+nflnXDuRZf80=";
};

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
libxml2
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" ];

Expand Down

0 comments on commit ee9d69b

Please sign in to comment.