diff options
Diffstat (limited to 'pkgs/development/libraries/hamlib/default.nix')
-rw-r--r-- | pkgs/development/libraries/hamlib/default.nix | 50 |
1 files changed, 40 insertions, 10 deletions
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; }; } |