diff --git a/pkgs/applications/radio/unixcw/default.nix b/pkgs/by-name/un/unixcw/package.nix similarity index 60% rename from pkgs/applications/radio/unixcw/default.nix rename to pkgs/by-name/un/unixcw/package.nix index 8565b691802d..fc169b90d32f 100644 --- a/pkgs/applications/radio/unixcw/default.nix +++ b/pkgs/by-name/un/unixcw/package.nix @@ -1,33 +1,54 @@ { lib, - mkDerivation, + stdenv, fetchurl, libpulseaudio, alsa-lib, pkg-config, - qtbase, + qt5, + ncurses, + autoreconfHook, }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "unixcw"; version = "3.5.1"; + src = fetchurl { url = "mirror://sourceforge/unixcw/unixcw_${version}.orig.tar.gz"; - sha256 = "5f3aacd8a26e16e6eff437c7ae1e9b389956fb137eeb3de24670ce05de479e7a"; + hash = "sha256-Xzqs2KJuFubv9DfHrh6bOJlW+xN+6z3iRnDOBd5Hnno="; }; + patches = [ ./remove-use-of-dlopen.patch + + # fix pkg-config searching for ncurses + # yoinked from gentoo (https://gitweb.gentoo.org/repo/gentoo.git/tree/media-radio/unixcw/files/unixcw-3.6-tinfo.patch), with modifications + ./unixcw-3.6-tinfo.patch ]; - nativeBuildInputs = [ pkg-config ]; + + postPatch = '' + substituteInPlace src/cwcp/Makefile.am \ + --replace-fail '-lcurses' '-lncurses' + ''; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + qt5.wrapQtAppsHook + ]; + buildInputs = [ libpulseaudio alsa-lib - qtbase + qt5.qtbase + ncurses ]; + CFLAGS = "-lasound -lpulse-simple"; - meta = with lib; { - description = "sound characters as Morse code on the soundcard or console speaker"; + meta = { + description = "Sound characters as Morse code on the soundcard or console speaker"; longDescription = '' unixcw is a project providing libcw library and a set of programs using the library: cw, cwgen, cwcp and xcwcp. @@ -44,8 +65,8 @@ mkDerivation rec { cw reports any errors in embedded commands ''; homepage = "https://unixcw.sourceforge.net"; - maintainers = [ maintainers.mafo ]; - license = licenses.gpl2; - platforms = platforms.linux; + maintainers = [ lib.maintainers.mafo ]; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; }; } diff --git a/pkgs/applications/radio/unixcw/remove-use-of-dlopen.patch b/pkgs/by-name/un/unixcw/remove-use-of-dlopen.patch similarity index 100% rename from pkgs/applications/radio/unixcw/remove-use-of-dlopen.patch rename to pkgs/by-name/un/unixcw/remove-use-of-dlopen.patch diff --git a/pkgs/by-name/un/unixcw/unixcw-3.6-tinfo.patch b/pkgs/by-name/un/unixcw/unixcw-3.6-tinfo.patch new file mode 100644 index 000000000000..01038fa1fdd8 --- /dev/null +++ b/pkgs/by-name/un/unixcw/unixcw-3.6-tinfo.patch @@ -0,0 +1,20 @@ +--- a/configure.ac 2017-03-07 13:31:46.074580930 +0100 ++++ b/configure.ac 2017-03-07 13:33:25.640924331 +0100 +@@ -347,7 +347,7 @@ + AC_DEFINE([LIBCW_WITH_PULSEAUDIO], [1], [Define as 1 if your build machine can support PulseAudio.]) + fi + +- ++PKG_PROG_PKG_CONFIG + + if test "$enable_cwcp" = "no" ; then + WITH_CWCP='no' +@@ -355,6 +355,7 @@ + AC_CHECK_LIB(curses, initscr) +- if test $ac_cv_lib_curses_initscr = 'yes' ; then ++ if true ; then + WITH_CWCP='yes' ++ PKG_CHECK_MODULES(ncurses, ncurses, [NCURSES_LIB="$ncurses_LIBS"], ) + else + WITH_CWCP='no' + AC_MSG_WARN([Cannot find libcurses - unable to build cwcp]) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 07150af86a81..3e700a4d082f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17925,8 +17925,6 @@ with pkgs; unityhub = callPackage ../development/tools/unityhub { }; - unixcw = libsForQt5.callPackage ../applications/radio/unixcw { }; - vaultenv = haskell.lib.justStaticExecutables haskellPackages.vaultenv; vaultwarden = callPackage ../tools/security/vaultwarden {