From a3f4b6f890d627b8216565133dde7ba9936f78a8 Mon Sep 17 00:00:00 2001 From: Matthew Leach Date: Sun, 11 Jul 2021 17:29:43 +0100 Subject: 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 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b9f9561022..63e1c73e7ff 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; -- cgit 1.4.1