2021-07-11 16:29:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, perl
|
|
|
|
, swig
|
|
|
|
, gd
|
|
|
|
, ncurses
|
|
|
|
, python3
|
|
|
|
, libxml2
|
|
|
|
, tcl
|
|
|
|
, libusb-compat-0_1
|
|
|
|
, pkg-config
|
|
|
|
, boost
|
|
|
|
, libtool
|
|
|
|
, perlPackages
|
|
|
|
, pythonBindings ? true
|
|
|
|
, tclBindings ? true
|
2021-08-18 19:12:26 +00:00
|
|
|
, perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform
|
|
|
|
, buildPackages
|
2021-07-11 16:29:43 +00:00
|
|
|
}:
|
2014-05-11 20:37:43 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-05-11 22:16:11 +00:00
|
|
|
pname = "hamlib";
|
2018-08-24 11:29:13 +00:00
|
|
|
version = "3.3";
|
2014-05-11 20:37:43 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
|
2018-08-24 11:29:13 +00:00
|
|
|
sha256 = "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9";
|
2014-05-11 20:37:43 +00:00
|
|
|
};
|
|
|
|
|
2021-08-18 19:12:26 +00:00
|
|
|
strictDeps = true;
|
|
|
|
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
2021-07-11 16:29:43 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
swig
|
|
|
|
pkg-config
|
|
|
|
libtool
|
2021-08-18 19:12:26 +00:00
|
|
|
] ++ lib.optionals pythonBindings [ python3 ]
|
|
|
|
++ lib.optionals tclBindings [ tcl ]
|
|
|
|
++ lib.optionals perlBindings [ perl ];
|
2014-05-11 20:37:43 +00:00
|
|
|
|
2021-07-11 16:29:43 +00:00
|
|
|
buildInputs = [
|
|
|
|
gd
|
|
|
|
libxml2
|
|
|
|
libusb-compat-0_1
|
|
|
|
boost
|
|
|
|
] ++ lib.optionals pythonBindings [ python3 ncurses ]
|
2021-08-18 19:12:26 +00:00
|
|
|
++ lib.optionals tclBindings [ tcl ];
|
|
|
|
|
2014-05-11 20:37:43 +00:00
|
|
|
|
2021-08-18 19:12:26 +00:00
|
|
|
configureFlags = [
|
|
|
|
"CC_FOR_BUILD=${stdenv.cc.targetPrefix}cc"
|
|
|
|
] ++ lib.optionals perlBindings [ "--with-perl-binding" ]
|
2021-07-11 16:29:43 +00:00
|
|
|
++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
|
|
|
|
++ lib.optionals pythonBindings [ "--with-python-binding" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2014-05-11 20:37:43 +00:00
|
|
|
description = "Runtime library to control radio transceivers and receivers";
|
|
|
|
longDescription = ''
|
|
|
|
Hamlib provides a standardized programming interface that applications
|
|
|
|
can use to send the appropriate commands to a radio.
|
|
|
|
|
|
|
|
Also included in the package is a simple radio control program 'rigctl',
|
|
|
|
which lets one control a radio transceiver or receiver, either from
|
|
|
|
command line interface or in a text-oriented interactive interface.
|
|
|
|
'';
|
2021-07-11 16:29:43 +00:00
|
|
|
license = with licenses; [ gpl2Plus lgpl2Plus ];
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://hamlib.sourceforge.net";
|
2021-07-11 16:29:43 +00:00
|
|
|
maintainers = with maintainers; [ relrod ];
|
|
|
|
platforms = with platforms; unix;
|
2014-05-11 20:37:43 +00:00
|
|
|
};
|
|
|
|
}
|