Files
nixpkgs/pkgs/development/libraries/hamlib/4.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

85 lines
1.9 KiB
Nix

{
lib,
stdenv,
fetchurl,
perl,
swig,
gd,
ncurses,
python311,
libxml2,
tcl,
libusb-compat-0_1,
pkg-config,
boost,
libtool,
pythonBindings ? true,
tclBindings ? true,
perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform,
buildPackages,
}:
let
python3 = python311; # needs distutils and imp
in
stdenv.mkDerivation rec {
pname = "hamlib";
version = "4.6.2";
src = fetchurl {
url = "mirror://sourceforge/hamlib/hamlib-${version}.tar.gz";
hash = "sha256-sqxz9E3RFh6V/e5slSdhRHV2R7+S1/2zae4v5B7Ueug=";
};
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 ];
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" ];
meta = {
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.
'';
license = with lib.licenses; [
gpl2Plus
lgpl2Plus
];
homepage = "https://hamlib.sourceforge.net";
maintainers = with lib.maintainers; [ relrod ];
platforms = with lib.platforms; unix;
};
}