diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/hamlib')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/hamlib/4.nix | 64 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/hamlib/default.nix | 71 |
2 files changed, 135 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/hamlib/4.nix b/nixpkgs/pkgs/development/libraries/hamlib/4.nix new file mode 100644 index 000000000000..474db9891aa7 --- /dev/null +++ b/nixpkgs/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.4"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "sha256-i/AQewcfUvCFh/OOLe6KeEjeE0NDWzJvj2bZXh+KJIc="; + }; + + 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/nixpkgs/pkgs/development/libraries/hamlib/default.nix b/nixpkgs/pkgs/development/libraries/hamlib/default.nix new file mode 100644 index 000000000000..31b620ae5d2e --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/hamlib/default.nix @@ -0,0 +1,71 @@ +{ lib +, stdenv +, fetchurl +, perl +, swig +, gd +, ncurses +, python3 +, libxml2 +, tcl +, libusb-compat-0_1 +, pkg-config +, boost +, libtool +, perlPackages +, pythonBindings ? true +, tclBindings ? true +, perlBindings ? stdenv.buildPlatform == stdenv.hostPlatform +, buildPackages +}: + +stdenv.mkDerivation rec { + pname = "hamlib"; + version = "3.3"; + + src = fetchurl { + url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz"; + sha256 = "10788mgrhbc57zpzakcxv5aqnr2819pcshml6fbh8zvnkja562y9"; + }; + + strictDeps = true; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + nativeBuildInputs = [ + swig + pkg-config + libtool + ] ++ 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 = 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; + }; +} |