summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-07-24 22:52:34 +0000
committerGitHub <noreply@github.com>2021-07-24 22:52:34 +0000
commitdd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5 (patch)
tree250ccfe471384195aab6abebdde5b029ce6a3f78 /pkgs/development/libraries
parentc8293a6f8a9e2e9a6a509ec097566e52139b2c19 (diff)
parenta7fe887c538a25674a2960489895a992fe841d21 (diff)
downloadnixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar.gz
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar.bz2
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar.lz
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar.xz
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.tar.zst
nixpkgs-dd2233fe6a2f93a8e3d5d986c757f6a4f4e0afc5.zip
Merge pull request #129950 from hexagonal-sun/hamlib-bump
hamlib: 3.3 -> 4.2
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/hamlib/4.nix64
-rw-r--r--pkgs/development/libraries/hamlib/default.nix50
2 files changed, 104 insertions, 10 deletions
diff --git a/pkgs/development/libraries/hamlib/4.nix b/pkgs/development/libraries/hamlib/4.nix
new file mode 100644
index 00000000000..cad69e8b418
--- /dev/null
+++ b/pkgs/development/libraries/hamlib/4.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchurl
+, perl
+, swig
+, gd
+, ncurses
+, python3
+, libxml2
+, tcl
+, libusb-compat-0_1
+, pkg-config
+, boost
+, libtool
+, perlPackages
+, pythonBindings ? true
+, tclBindings ? true
+, perlBindings ? true
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hamlib";
+  version = "4.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
+    sha256 = "1m8gb20i8ga6ndnnw187ry1h4z8wx27v1hl7c610r6ky60pv4072";
+  };
+
+  nativeBuildInputs = [
+    swig
+    pkg-config
+    libtool
+  ];
+
+  buildInputs = [
+    gd
+    libxml2
+    libusb-compat-0_1
+    boost
+  ] ++ lib.optionals pythonBindings [ python3 ncurses ]
+    ++ lib.optionals tclBindings [ tcl ]
+    ++ lib.optionals perlBindings [ perl perlPackages.ExtUtilsMakeMaker ];
+
+  configureFlags = lib.optionals perlBindings [ "--with-perl-binding" ]
+    ++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
+    ++ lib.optionals pythonBindings [ "--with-python-binding" ];
+
+  meta = with lib; {
+    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 licenses; [ gpl2Plus lgpl2Plus ];
+    homepage = "http://hamlib.sourceforge.net";
+    maintainers = with maintainers; [ relrod ];
+    platforms = with platforms; unix;
+  };
+}
diff --git a/pkgs/development/libraries/hamlib/default.nix b/pkgs/development/libraries/hamlib/default.nix
index 98b49461005..cd56b04c034 100644
--- a/pkgs/development/libraries/hamlib/default.nix
+++ b/pkgs/development/libraries/hamlib/default.nix
@@ -1,5 +1,22 @@
-{lib, stdenv, fetchurl, perl, python2, swig, gd, libxml2, tcl, libusb-compat-0_1, pkg-config,
- boost, libtool, perlPackages }:
+{ lib
+, stdenv
+, fetchurl
+, perl
+, swig
+, gd
+, ncurses
+, python3
+, libxml2
+, tcl
+, libusb-compat-0_1
+, pkg-config
+, boost
+, libtool
+, perlPackages
+, pythonBindings ? true
+, tclBindings ? true
+, perlBindings ? true
+}:
 
 stdenv.mkDerivation rec {
   pname = "hamlib";
@@ -10,13 +27,26 @@ stdenv.mkDerivation rec {
     sha256 = "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9";
   };
 
-  buildInputs = [ perl perlPackages.ExtUtilsMakeMaker python2 swig gd libxml2
-                  tcl libusb-compat-0_1 pkg-config boost libtool ];
+  nativeBuildInputs = [
+    swig
+    pkg-config
+    libtool
+  ];
 
-  configureFlags = [ "--with-perl-binding" "--with-python-binding"
-                     "--with-tcl-binding" "--with-rigmatrix" ];
+  buildInputs = [
+    gd
+    libxml2
+    libusb-compat-0_1
+    boost
+  ] ++ lib.optionals pythonBindings [ python3 ncurses ]
+    ++ lib.optionals tclBindings [ tcl ]
+    ++ lib.optionals perlBindings [ perl perlPackages.ExtUtilsMakeMaker ];
 
-  meta = {
+  configureFlags = lib.optionals perlBindings [ "--with-perl-binding" ]
+    ++ lib.optionals tclBindings [ "--with-tcl-binding" "--with-tcl=${tcl}/lib/" ]
+    ++ lib.optionals pythonBindings [ "--with-python-binding" ];
+
+  meta = with lib; {
     description = "Runtime library to control radio transceivers and receivers";
     longDescription = ''
     Hamlib provides a standardized programming interface that applications
@@ -26,9 +56,9 @@ stdenv.mkDerivation rec {
     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 ];
+    license = with licenses; [ gpl2Plus lgpl2Plus ];
     homepage = "http://hamlib.sourceforge.net";
-    maintainers = with lib.maintainers; [ relrod ];
-    platforms = with lib.platforms; unix;
+    maintainers = with maintainers; [ relrod ];
+    platforms = with platforms; unix;
   };
 }