Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib
2, stdenv
3, fetchurl
4, perl
5, swig
6, gd
7, ncurses
8, python3
9, libxml2
10, tcl
11, libusb-compat-0_1
12, pkg-config
13, boost
14, libtool
15, perlPackages
16, pythonBindings ? true
17, tclBindings ? true
18, perlBindings ? true
19}:
20
21stdenv.mkDerivation rec {
22 pname = "hamlib";
23 version = "4.5.5";
24
25 src = fetchurl {
26 url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
27 sha256 = "sha256-YByJ8y7SJelSet49ZNDQXSMgLAWuIf+nflnXDuRZf80=";
28 };
29
30 nativeBuildInputs = [
31 swig
32 pkg-config
33 libtool
34 ];
35
36 buildInputs = [
37 gd
38 libxml2
39 libusb-compat-0_1
40 boost
41 ] ++ lib.optionals pythonBindings [ python3 ncurses ]
42 ++ lib.optionals tclBindings [ tcl ]
43 ++ lib.optionals perlBindings [ perl perlPackages.ExtUtilsMakeMaker ];
44
45 configureFlags = lib.optionals perlBindings [ "--with-perl-binding" ]
46 ++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
47 ++ lib.optionals pythonBindings [ "--with-python-binding" ];
48
49 meta = with lib; {
50 description = "Runtime library to control radio transceivers and receivers";
51 longDescription = ''
52 Hamlib provides a standardized programming interface that applications
53 can use to send the appropriate commands to a radio.
54
55 Also included in the package is a simple radio control program 'rigctl',
56 which lets one control a radio transceiver or receiver, either from
57 command line interface or in a text-oriented interactive interface.
58 '';
59 license = with licenses; [ gpl2Plus lgpl2Plus ];
60 homepage = "https://hamlib.sourceforge.net";
61 maintainers = with maintainers; [ relrod ];
62 platforms = with platforms; unix;
63 };
64}