From a3f4b6f890d627b8216565133dde7ba9936f78a8 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Sun, 11 Jul 2021 17:29:43 +0100 Subject: [PATCH 1/5] hamlib: 3.3 -> 4.2 --- pkgs/development/libraries/hamlib/4.nix | 64 +++++++++++++++++++ pkgs/development/libraries/hamlib/default.nix | 50 ++++++++++++--- pkgs/top-level/all-packages.nix | 4 +- 3 files changed, 107 insertions(+), 11 deletions(-) create mode 100644 pkgs/development/libraries/hamlib/4.nix diff --git a/pkgs/development/libraries/hamlib/4.nix b/pkgs/development/libraries/hamlib/4.nix new file mode 100644 index 000000000000..cad69e8b4187 --- /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 98b494610057..cd56b04c0346 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b9f95610228..63e1c73e7ffc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15692,7 +15692,9 @@ in gwenhywfar = callPackage ../development/libraries/aqbanking/gwenhywfar.nix { }; - hamlib = callPackage ../development/libraries/hamlib { }; + hamlib = hamlib_3; + hamlib_3 = callPackage ../development/libraries/hamlib { }; + hamlib_4 = callPackage ../development/libraries/hamlib/4.nix { }; heimdal = callPackage ../development/libraries/kerberos/heimdal.nix { inherit (darwin.apple_sdk.frameworks) CoreFoundation Security SystemConfiguration; From 70c06e4c2bf7f90e0b723263e600a52c88e8d5df Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Fri, 23 Jul 2021 20:11:15 +0100 Subject: [PATCH 2/5] fldigi: use hamlib 4.2 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 63e1c73e7ffc..c1756d307d0a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23850,7 +23850,9 @@ in flexget = callPackage ../applications/networking/flexget { }; - fldigi = callPackage ../applications/radio/fldigi { }; + fldigi = callPackage ../applications/radio/fldigi { + hamlib = hamlib_4; + }; flink = callPackage ../applications/networking/cluster/flink { }; From e057fb2ffd5823d8af130d88a3ae20ea69a39e38 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Fri, 23 Jul 2021 20:12:03 +0100 Subject: [PATCH 3/5] cqrlog: use hamlib 4.2 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c1756d307d0a..162a29c7f66d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23440,7 +23440,9 @@ in python3Packages = python37Packages; }; - cqrlog = callPackage ../applications/radio/cqrlog { }; + cqrlog = callPackage ../applications/radio/cqrlog { + hamlib = hamlib_4; + }; crun = callPackage ../applications/virtualization/crun {}; From 60354bc4ea0b6ed4fd58b53e51438e0eb384de62 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Fri, 23 Jul 2021 20:12:39 +0100 Subject: [PATCH 4/5] direwolf: use hamlib 4.2 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 162a29c7f66d..53727238adbe 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23520,7 +23520,9 @@ in inherit (pkgs.gnome2) libart_lgpl libgnomeui; }; - direwolf = callPackage ../applications/radio/direwolf { }; + direwolf = callPackage ../applications/radio/direwolf { + hamlib = hamlib_4; + }; dirt = callPackage ../applications/audio/dirt {}; From a7fe887c538a25674a2960489895a992fe841d21 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Fri, 23 Jul 2021 20:13:14 +0100 Subject: [PATCH 5/5] gpredict: use hamlib 4.2 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53727238adbe..2e3ea88125ce 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5471,7 +5471,9 @@ in gpp = callPackage ../development/tools/gpp { }; - gpredict = callPackage ../applications/science/astronomy/gpredict { }; + gpredict = callPackage ../applications/science/astronomy/gpredict { + hamlib = hamlib_4; + }; gptfdisk = callPackage ../tools/system/gptfdisk { };