1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
{
lib,
stdenv,
fetchFromGitHub,
perl,
swig,
autoreconfHook,
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 (finalAttrs: {
pname = "hamlib";
version = "4.7.2";
src = fetchFromGitHub {
owner = "Hamlib";
repo = "Hamlib";
tag = finalAttrs.version;
hash = "sha256-t1GgCYH+AJE5UZKQu+9uqx7fJDv4zuT0OzWxicZFfdQ=";
};
strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [
swig
pkg-config
libtool
autoreconfHook
]
++ 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
fstracke
];
platforms = with lib.platforms; unix;
};
})
|