diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-02-13 12:33:29 +0100 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-02-13 12:33:29 +0100 |
commit | 7257dedd7cf28634e08fc0458ed34a183065b70e (patch) | |
tree | 53d0274ecfd0474666bceec021ce059e428a4b47 /pkgs/applications/misc | |
parent | 7c3588d8ddc35909ca56394c3a5464d6e1551fe0 (diff) | |
parent | 563b491ce89bafaa928beba19a37f6381bfc60d0 (diff) | |
download | nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.gz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.bz2 nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.lz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.xz nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.tar.zst nixlib-7257dedd7cf28634e08fc0458ed34a183065b70e.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/misc')
45 files changed, 279 insertions, 2226 deletions
diff --git a/pkgs/applications/misc/airspy/default.nix b/pkgs/applications/misc/airspy/default.nix deleted file mode 100644 index 2042f1047b22..000000000000 --- a/pkgs/applications/misc/airspy/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ stdenv, lib, fetchFromGitHub -, cmake , pkgconfig, libusb -}: - -let - version = "1.0.9"; -in - stdenv.mkDerivation { - name = "airspy-${version}"; - - src = fetchFromGitHub { - owner = "airspy"; - repo = "airspyone_host"; - rev = "v${version}"; - sha256 = "04kx2p461sqd4q354n1a99zcabg9h29dwcnyhakykq8bpg3mgf1x"; - }; - - postPatch = '' - substituteInPlace airspy-tools/CMakeLists.txt --replace "/etc/udev/rules.d" "$out/etc/udev/rules.d" - ''; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ libusb ]; - - cmakeFlags = - lib.optionals stdenv.isLinux [ "-DINSTALL_UDEV_RULES=ON" ]; - - meta = with stdenv.lib; { - homepage = https://github.com/airspy/airspyone_host; - description = "Host tools and driver library for the AirSpy SDR"; - license = licenses.bsd3; - platforms = with platforms; linux ++ darwin; - maintainers = with maintainers; [ markuskowa ]; - }; - } diff --git a/pkgs/applications/misc/alacritty/default.nix b/pkgs/applications/misc/alacritty/default.nix index 06512f6123b1..ef0b49f8d7ba 100644 --- a/pkgs/applications/misc/alacritty/default.nix +++ b/pkgs/applications/misc/alacritty/default.nix @@ -43,16 +43,16 @@ let ]; in buildRustPackage rec { name = "alacritty-${version}"; - version = "0.2.6"; + version = "0.2.9"; src = fetchFromGitHub { owner = "jwilm"; repo = "alacritty"; rev = "v${version}"; - sha256 = "1yjmlvxs5vwqhgjlb83a4hq2b12zzhr4pp209djprgdi0cf2bbqw"; + sha256 = "01wzkpbz6jjmpmnkqswilnn069ir3cx3jvd3j7zsvqdxqpwncz39"; }; - cargoSha256 = "11n5xl43l07zycdg0icv4i7mh6zy4ia6aw48i0wm59xqdl7xqn9f"; + cargoSha256 = "0h9wczgpjh52lhrqg0r2dkrh5svmyvrvh4yj7p0nz45skgrnl8w9"; nativeBuildInputs = [ cmake diff --git a/pkgs/applications/misc/chirp/default.nix b/pkgs/applications/misc/chirp/default.nix deleted file mode 100644 index acc35131e2d5..000000000000 --- a/pkgs/applications/misc/chirp/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, fetchurl, libxml2Python, libxslt, makeWrapper -, pyserial, pygtk }: - -stdenv.mkDerivation rec { - pname = "chirp-daily"; - version = "20190201"; - - src = fetchurl { - url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${pname}-${version}.tar.gz"; - sha256 = "1ag3qzdq39zhpagviq9gpwk4y3h11z0j40nccsnhlq8h8bxpvwlf"; - }; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ - pyserial pygtk libxml2Python libxslt pyserial - ]; - - installPhase = '' - mkdir -p $out/bin $out/share/chirp - cp -r . $out/share/chirp/ - ln -s $out/share/chirp/chirpw $out/bin/chirpw - - for file in "$out"/bin/*; do - wrapProgram "$file" \ - --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - meta = with stdenv.lib; { - description = "A free, open-source tool for programming your amateur radio"; - homepage = https://chirp.danplanet.com/; - license = licenses.gpl3; - platforms = platforms.linux; - maintainers = [ maintainers.the-kenny ]; - }; -} diff --git a/pkgs/applications/misc/dmrconfig/default.nix b/pkgs/applications/misc/dmrconfig/default.nix deleted file mode 100644 index 7125e37f7f95..000000000000 --- a/pkgs/applications/misc/dmrconfig/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ stdenv, fetchFromGitHub -, libusb1, systemd }: - -stdenv.mkDerivation rec { - name = "dmrconfig-${version}"; - version = "1.1"; - - src = fetchFromGitHub { - owner = "sergev"; - repo = "dmrconfig"; - rev = version; - sha256 = "1qwix75z749628w583fwp7m7kxbj0k3g159sxb7vgqxbadqqz1ab"; - }; - - buildInputs = [ - libusb1 systemd - ]; - - preConfigure = '' - substituteInPlace Makefile \ - --replace /usr/local/bin/dmrconfig $out/bin/dmrconfig - ''; - - makeFlags = "VERSION=${version} GITCOUNT=0"; - - installPhase = '' - mkdir -p $out/bin $out/lib/udev/rules.d - make install - install 99-dmr.rules $out/lib/udev/rules.d/99-dmr.rules - ''; - - meta = with stdenv.lib; { - description = "Configuration utility for DMR radios"; - longDescription = '' - DMRconfig is a utility for programming digital radios via USB programming cable. - ''; - homepage = https://github.com/sergev/dmrconfig; - license = licenses.asl20; - maintainers = [ maintainers.etu ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/fllog/default.nix b/pkgs/applications/misc/fllog/default.nix deleted file mode 100644 index 348b1155e41e..000000000000 --- a/pkgs/applications/misc/fllog/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ stdenv -, fetchurl -, fltk13 -, libjpeg -, pkgconfig -}: - -stdenv.mkDerivation rec { - version = "1.2.5"; - pname = "fllog"; - name = "${pname}-${version}"; - - src = fetchurl { - url = "mirror://sourceforge/fldigi/${name}.tar.gz"; - sha256 = "042j1g035338vfbl4i9laai8af8iakavar05xn2m4p7ww6x76zzl"; - }; - - buildInputs = [ - fltk13 - libjpeg - ]; - - nativeBuildInputs = [ - pkgconfig - ]; - - meta = { - description = "Digital modem log program"; - homepage = https://sourceforge.net/projects/fldigi/; - license = stdenv.lib.licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ dysinger ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/misc/flmsg/default.nix b/pkgs/applications/misc/flmsg/default.nix deleted file mode 100644 index 239d392c374e..000000000000 --- a/pkgs/applications/misc/flmsg/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv -, fetchurl -, fltk13 -, libjpeg -, pkgconfig -}: - -stdenv.mkDerivation rec { - version = "4.0.8"; - pname = "flmsg"; - - src = fetchurl { - url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz"; - sha256 = "1yy9z6mchs7r3x108z5rp0h6a18zjqrn9zq5x72qwqh1byjnfwc8"; - }; - - buildInputs = [ - fltk13 - libjpeg - ]; - - nativeBuildInputs = [ - pkgconfig - ]; - - meta = { - description = "Digital modem message program"; - homepage = https://sourceforge.net/projects/fldigi/; - license = stdenv.lib.licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ dysinger ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/misc/flrig/default.nix b/pkgs/applications/misc/flrig/default.nix deleted file mode 100644 index de4b448b5c37..000000000000 --- a/pkgs/applications/misc/flrig/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv -, fetchurl -, fltk13 -, libjpeg -, pkgconfig -}: - -stdenv.mkDerivation rec { - version = "1.3.42"; - pname = "flrig"; - - src = fetchurl { - url = "mirror://sourceforge/fldigi/${pname}-${version}.tar.gz"; - sha256 = "10qn710ms145zq2xzb6z2fnygxmh5pmfmyfdbphrc7mrvd0phzp0"; - }; - - buildInputs = [ - fltk13 - libjpeg - ]; - - nativeBuildInputs = [ - pkgconfig - ]; - - meta = { - description = "Digital modem rig control program"; - homepage = https://sourceforge.net/projects/fldigi/; - license = stdenv.lib.licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ dysinger ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/misc/flwrap/default.nix b/pkgs/applications/misc/flwrap/default.nix deleted file mode 100644 index b96f3c2b3278..000000000000 --- a/pkgs/applications/misc/flwrap/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ stdenv -, fetchurl -, fltk13 -, libjpeg -, pkgconfig -}: - -stdenv.mkDerivation rec { - version = "1.3.5"; - pname = "flwrap"; - name = "${pname}-${version}"; - - src = fetchurl { - url = "mirror://sourceforge/fldigi/${name}.tar.gz"; - sha256 = "0qqivqkkravcg7j45740xfky2q3k7czqpkj6y364qff424q2pppg"; - }; - - buildInputs = [ - fltk13 - libjpeg - ]; - - nativeBuildInputs = [ - pkgconfig - ]; - - meta = { - description = "Digital modem file transfer program"; - homepage = https://sourceforge.net/projects/fldigi/; - license = stdenv.lib.licenses.gpl3Plus; - maintainers = with stdenv.lib.maintainers; [ dysinger ]; - platforms = stdenv.lib.platforms.linux; - }; -} diff --git a/pkgs/applications/misc/gnss-sdr/default.nix b/pkgs/applications/misc/gnss-sdr/default.nix deleted file mode 100644 index 6cbdea8c6867..000000000000 --- a/pkgs/applications/misc/gnss-sdr/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ stdenv, fetchFromGitHub -, armadillo -, boost -, cmake -, glog -, gmock -, openssl -, google-gflags -, gnuradio -, orc -, pkgconfig -, pythonPackages -, uhd -}: - -stdenv.mkDerivation rec { - name = "gnss-sdr-${version}"; - version = "0.0.9"; - - src = fetchFromGitHub { - owner = "gnss-sdr"; - repo = "gnss-sdr"; - rev = "v${version}"; - sha256 = "0gis932ly3vk7d5qvznffp54pkmbw3m6v60mxjfdj5dd3r7vf975"; - }; - - buildInputs = [ - armadillo - boost.dev - cmake - glog - gmock - openssl.dev - google-gflags - gnuradio - orc - pkgconfig - pythonPackages.Mako - - # UHD support is optional, but gnuradio is built with it, so there's - # nothing to be gained by leaving it out. - uhd - ]; - - enableParallelBuilding = true; - - cmakeFlags = [ - "-DGFlags_ROOT_DIR=${google-gflags}/lib" - "-DGLOG_INCLUDE_DIR=${glog}/include" - "-DENABLE_UNIT_TESTING=OFF" - - # gnss-sdr doesn't truly depend on BLAS or LAPACK, as long as - # armadillo is built using both, so skip checking for them. - "-DBLAS=YES" - "-DLAPACK=YES" - - # Similarly, it doesn't actually use gfortran despite checking for - # its presence. - "-DGFORTRAN=YES" - ]; - - meta = with stdenv.lib; { - description = "An open source Global Navigation Satellite Systems software-defined receiver"; - homepage = https://gnss-sdr.org/; - license = licenses.gpl3Plus; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/gnuradio/ais.nix b/pkgs/applications/misc/gnuradio/ais.nix deleted file mode 100644 index dfb8415219c7..000000000000 --- a/pkgs/applications/misc/gnuradio/ais.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio -, makeWrapper, cppunit, gnuradio-osmosdr -, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - name = "gnuradio-ais-${version}"; - version = "2015-12-20"; - - src = fetchFromGitHub { - owner = "bistromath"; - repo = "gr-ais"; - # Upstream PR: https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054 - "rev" = "8502d0252a2a1a9b8d1a71795eaeb5d820684054"; - "sha256" = "1b9j0kc74cw12a7jv4lii77dgzqzg2s8ndzp4xmisxksgva1qfvh"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake boost gnuradio makeWrapper cppunit gnuradio-osmosdr - ] ++ stdenv.lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio block for ais"; - homepage = https://github.com/bistromath/gr-ais; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix deleted file mode 100644 index f9a50313c472..000000000000 --- a/pkgs/applications/misc/gnuradio/default.nix +++ /dev/null @@ -1,126 +0,0 @@ -{ stdenv, fetchFromGitHub, writeText, makeWrapper -# Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html -# => core dependencies -, cmake, pkgconfig, git, boost, cppunit, fftw -# => python wrappers -# May be able to upgrade to swig3 -, python, swig2, numpy, scipy, matplotlib -# => grc - the gnu radio companion -, Mako, cheetah, pygtk # Note: GR is migrating to Mako. Cheetah should be removed for GR3.8 -# => gr-wavelet: collection of wavelet blocks -, gsl -# => gr-qtgui: the Qt-based GUI -, qt4, qwt, pyqt4 -# => gr-wxgui: the Wx-based GUI -, wxPython, lxml -# => gr-audio: audio subsystems (system/OS dependent) -, alsaLib # linux 'audio-alsa' -, CoreAudio # darwin 'audio-osx' -# => uhd: the Ettus USRP Hardware Driver Interface -, uhd -# => gr-video-sdl: PAL and NTSC display -, SDL -# Other -, libusb1, orc, pyopengl -}: - -stdenv.mkDerivation rec { - name = "gnuradio-${version}"; - version = "3.7.13.4"; - - src = fetchFromGitHub { - owner = "gnuradio"; - repo = "gnuradio"; - rev = "v${version}"; - sha256 = "0ybfn2zfr9lc1bi3c794l4bzpj8y6vas9c4rbcj4nqlx0zf3p8fn"; - fetchSubmodules = true; - }; - - nativeBuildInputs = [ - cmake pkgconfig git makeWrapper cppunit orc - ]; - - buildInputs = [ - boost fftw python swig2 lxml qt4 - qwt SDL libusb1 uhd gsl - ] ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib ] - ++ stdenv.lib.optionals stdenv.isDarwin [ CoreAudio ]; - - propagatedBuildInputs = [ - Mako cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl - ]; - - NIX_LDFLAGS = [ - "-lpthread" - ]; - - enableParallelBuilding = true; - - postPatch = '' - substituteInPlace \ - gr-fec/include/gnuradio/fec/polar_decoder_common.h \ - --replace BOOST_CONSTEXPR_OR_CONST const - ''; - - # Enables composition with nix-shell - grcSetupHook = writeText "grcSetupHook.sh" '' - addGRCBlocksPath() { - addToSearchPath GRC_BLOCKS_PATH $1/share/gnuradio/grc/blocks - } - addEnvHooks "$targetOffset" addGRCBlocksPath - ''; - - setupHook = [ grcSetupHook ]; - - # patch wxgui and pygtk check due to python importerror in a headless environment - # wxgtk gui will be removed in GR3.8 - # c++11 hack may not be necessary anymore - preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable ${stdenv.lib.optionalString (!stdenv.isDarwin) "-std=c++11"}" - sed -i 's/.*wx\.version.*/set(WX_FOUND TRUE)/g' gr-wxgui/CMakeLists.txt - sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt - find . -name "CMakeLists.txt" -exec sed -i '1iadd_compile_options($<$<COMPILE_LANGUAGE:CXX>:-std=c++11>)' "{}" ";" - ''; - - # Framework path needed for qwt6_qt4 but not qwt5 - cmakeFlags = - stdenv.lib.optionals stdenv.isDarwin [ "-DCMAKE_FRAMEWORK_PATH=${qwt}/lib" ]; - - # - Ensure we get an interactive backend for matplotlib. If not the gr_plot_* - # programs will not display anything. Yes, $MATPLOTLIBRC must point to the - # *dirname* where matplotlibrc is located, not the file itself. - # - GNU Radio core is C++ but the user interface (GUI and API) is Python, so - # we must wrap the stuff in bin/. - # Notes: - # - May want to use makeWrapper instead of wrapProgram - # - may want to change interpreter path on Python examples instead of wrapping - # - see https://github.com/NixOS/nixpkgs/issues/22688 regarding use of --prefix / python.withPackages - # - see https://github.com/NixOS/nixpkgs/issues/24693 regarding use of DYLD_FRAMEWORK_PATH on Darwin - postInstall = '' - printf "backend : Qt4Agg\n" > "$out/share/gnuradio/matplotlibrc" - - for file in $(find $out/bin $out/share/gnuradio/examples -type f -executable); do - wrapProgram "$file" \ - --prefix PYTHONPATH : $PYTHONPATH:$(toPythonPath "$out") \ - --set MATPLOTLIBRC "$out/share/gnuradio" \ - ${stdenv.lib.optionalString stdenv.isDarwin "--set DYLD_FRAMEWORK_PATH /System/Library/Frameworks"} - done - ''; - - meta = with stdenv.lib; { - description = "Software Defined Radio (SDR) software"; - longDescription = '' - GNU Radio is a free & open-source software development toolkit that - provides signal processing blocks to implement software radios. It can be - used with readily-available low-cost external RF hardware to create - software-defined radios, or without hardware in a simulation-like - environment. It is widely used in hobbyist, academic and commercial - environments to support both wireless communications research and - real-world radio systems. - ''; - homepage = https://www.gnuradio.org; - license = licenses.gpl3; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bjornfor fpletz ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/gsm.nix b/pkgs/applications/misc/gnuradio/gsm.nix deleted file mode 100644 index dcb50df70520..000000000000 --- a/pkgs/applications/misc/gnuradio/gsm.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio -, makeWrapper, cppunit, libosmocore, gnuradio-osmosdr -, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - name = "gnuradio-gsm-${version}"; - version = "2016-08-25"; - - src = fetchFromGitHub { - owner = "ptrkrysik"; - repo = "gr-gsm"; - rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d"; - sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake boost gnuradio makeWrapper cppunit libosmocore gnuradio-osmosdr - ] ++ stdenv.lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gnuradio-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out") - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio block for gsm"; - homepage = https://github.com/ptrkrysik/gr-gsm; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/limesdr.nix b/pkgs/applications/misc/gnuradio/limesdr.nix deleted file mode 100644 index 0a5d4f56d278..000000000000 --- a/pkgs/applications/misc/gnuradio/limesdr.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, boost, gnuradio -, pythonSupport ? true, python, swig, limesuite -} : - -assert pythonSupport -> python != null && swig != null; - -let - version = "1.0.0-RC"; - -in stdenv.mkDerivation rec { - name = "gnuradio-limesdr-${version}"; - - src = fetchFromGitHub { - owner = "myriadrf"; - repo = "gr-limesdr"; - rev = "v${version}"; - sha256 = "0b34mg9nfar2gcir98004ixrxmxi8p3p2hrvvi1razd869x2a0lf"; - }; - - nativeBuildInputs = [ - cmake - ] ++ stdenv.lib.optionals pythonSupport [ swig ]; - - buildInputs = [ - boost gnuradio limesuite - ] ++ stdenv.lib.optionals pythonSupport [ python ]; - - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio source and sink blocks for LimeSDR"; - homepage = https://wiki.myriadrf.org/Gr-limesdr_Plugin_for_GNURadio; - license = licenses.mit; - platforms = platforms.linux; - maintainers = [ maintainers.markuskowa ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/nacl.nix b/pkgs/applications/misc/gnuradio/nacl.nix deleted file mode 100644 index 2f4b0e4e3eb6..000000000000 --- a/pkgs/applications/misc/gnuradio/nacl.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio, uhd -, makeWrapper, libsodium, cppunit -, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - name = "gnuradio-nacl-${version}"; - version = "2017-04-10"; - - src = fetchFromGitHub { - owner = "stwunsch"; - repo = "gr-nacl"; - rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765"; - sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake boost gnuradio uhd makeWrapper libsodium cppunit - ] ++ stdenv.lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio block for encryption"; - homepage = https://github.com/stwunsch/gr-nacl; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/osmosdr.nix b/pkgs/applications/misc/gnuradio/osmosdr.nix deleted file mode 100644 index 846afe0e95d4..000000000000 --- a/pkgs/applications/misc/gnuradio/osmosdr.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, fetchgit, cmake, pkgconfig, makeWrapper -, boost -, pythonSupport ? true, python, swig -, airspy -, gnuradio -, hackrf -, libbladeRF -, rtl-sdr -, soapysdr-with-plugins -, uhd -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - name = "gnuradio-osmosdr-${version}"; - version = "2018-08-15"; - - src = fetchgit { - url = "git://git.osmocom.org/gr-osmosdr"; - rev = "4d83c6067f059b0c5015c3f59f8117bbd361e877"; - sha256 = "1d5nb47506qry52bg4cn02d3l4lwxwz44g2fz1ph0q93c7892j60"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake makeWrapper boost - airspy gnuradio hackrf libbladeRF rtl-sdr uhd - ] ++ stdenv.lib.optionals stdenv.isLinux [ soapysdr-with-plugins ] - ++ stdenv.lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio block for OsmoSDR and rtl-sdr"; - homepage = https://sdr.osmocom.org/trac/wiki/GrOsmoSDR; - license = licenses.gpl3Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ bjornfor the-kenny ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/rds.nix b/pkgs/applications/misc/gnuradio/rds.nix deleted file mode 100644 index 2e5443227fda..000000000000 --- a/pkgs/applications/misc/gnuradio/rds.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio -, makeWrapper, pythonSupport ? true, python, swig -}: - -assert pythonSupport -> python != null && swig != null; - -stdenv.mkDerivation rec { - name = "gnuradio-rds-${version}"; - version = "1.1.0"; - - src = fetchFromGitHub { - owner = "bastibl"; - repo = "gr-rds"; - rev = "v${version}"; - sha256 = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake boost gnuradio makeWrapper - ] ++ stdenv.lib.optionals pythonSupport [ python swig ]; - - postInstall = '' - for prog in "$out"/bin/*; do - wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") - done - ''; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "Gnuradio block for radio data system"; - homepage = https://github.com/bastibl/gr-rds; - license = licenses.gpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = with maintainers; [ mog ]; - }; -} diff --git a/pkgs/applications/misc/gnuradio/wrapper.nix b/pkgs/applications/misc/gnuradio/wrapper.nix deleted file mode 100644 index ffed3da03187..000000000000 --- a/pkgs/applications/misc/gnuradio/wrapper.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, gnuradio, makeWrapper, python, extraPackages ? [] }: - -with { inherit (stdenv.lib) appendToName makeSearchPath; }; - -stdenv.mkDerivation { - name = (appendToName "with-packages" gnuradio).name; - buildInputs = [ makeWrapper python ]; - - buildCommand = '' - mkdir -p $out/bin - ln -s "${gnuradio}"/bin/* $out/bin/ - - for file in $(find -L $out/bin -type f); do - if test -x "$(readlink -f "$file")"; then - wrapProgram "$file" \ - --prefix PYTHONPATH : ${stdenv.lib.concatStringsSep ":" - (map (path: "$(toPythonPath ${path})") extraPackages)} \ - --prefix GRC_BLOCKS_PATH : ${makeSearchPath "share/gnuradio/grc/blocks" extraPackages} - fi - done - ''; - - inherit (gnuradio) meta; -} diff --git a/pkgs/applications/misc/gqrx/default.nix b/pkgs/applications/misc/gqrx/default.nix deleted file mode 100644 index f7c7ca5472e0..000000000000 --- a/pkgs/applications/misc/gqrx/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, qtbase, qtsvg, gnuradio, boost, gnuradio-osmosdr -# drivers (optional): -, rtl-sdr, hackrf -, pulseaudioSupport ? true, libpulseaudio -}: - -assert pulseaudioSupport -> libpulseaudio != null; - -stdenv.mkDerivation rec { - name = "gqrx-${version}"; - version = "2.11.5"; - - src = fetchFromGitHub { - owner = "csete"; - repo = "gqrx"; - rev = "v${version}"; - sha256 = "0q9i0dhd6blagxzk84pzqjq8n4ym3jc1mkkhygg8yncr4vq2saaf"; - }; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ - qtbase qtsvg gnuradio boost gnuradio-osmosdr rtl-sdr hackrf - ] ++ stdenv.lib.optionals pulseaudioSupport [ libpulseaudio ]; - - enableParallelBuilding = true; - - postInstall = '' - install -vD $src/gqrx.desktop -t "$out/share/applications/" - install -vD $src/resources/icons/gqrx.svg -t "$out/share/icons/" - ''; - - meta = with stdenv.lib; { - description = "Software defined radio (SDR) receiver"; - longDescription = '' - Gqrx is a software defined radio receiver powered by GNU Radio and the Qt - GUI toolkit. It can process I/Q data from many types of input devices, - including Funcube Dongle Pro/Pro+, rtl-sdr, HackRF, and Universal - Software Radio Peripheral (USRP) devices. - ''; - homepage = http://gqrx.dk/; - # Some of the code comes from the Cutesdr project, with a BSD license, but - # it's currently unknown which version of the BSD license that is. - license = licenses.gpl3Plus; - platforms = platforms.linux; # should work on Darwin / macOS too - maintainers = with maintainers; [ bjornfor the-kenny fpletz ]; - }; -} diff --git a/pkgs/applications/misc/hackrf/default.nix b/pkgs/applications/misc/hackrf/default.nix deleted file mode 100644 index 81a66bf503c0..000000000000 --- a/pkgs/applications/misc/hackrf/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, libusb, fftwSinglePrec }: - -stdenv.mkDerivation rec { - name = "hackrf-${version}"; - version = "2018.01.1"; - - src = fetchFromGitHub { - owner = "mossmann"; - repo = "hackrf"; - rev = "v${version}"; - sha256 = "0idh983xh6gndk9kdgx5nzz76x3mxb42b02c5xvdqahadsfx3b9w"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake libusb fftwSinglePrec - ]; - - cmakeFlags = [ "-DUDEV_RULES_GROUP=plugdev" "-DUDEV_RULES_PATH=lib/udev/rules.d" ]; - - preConfigure = '' - cd host - ''; - - meta = with stdenv.lib; { - description = "An open source SDR platform"; - homepage = http://greatscottgadgets.com/hackrf/; - license = licenses.gpl2; - platforms = platforms.all; - maintainers = with maintainers; [ sjmackenzie the-kenny ]; - }; -} diff --git a/pkgs/applications/misc/inspectrum/default.nix b/pkgs/applications/misc/inspectrum/default.nix deleted file mode 100644 index e2232c4b2ec8..000000000000 --- a/pkgs/applications/misc/inspectrum/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv -, fetchFromGitHub -, pkgconfig -, cmake -, boost -, fftwFloat -, qt5 -, gnuradio -, liquid-dsp -}: - -stdenv.mkDerivation rec { - name = "inspectrum-unstable-2017-05-31"; - - src = fetchFromGitHub { - owner = "miek"; - repo = "inspectrum"; - rev = "a89d1337efb31673ccb6a6681bb89c21894c76f7"; - sha256 = "1fvnr8gca25i6s9mg9b2hyqs0zzr4jicw13mimc9dhrgxklrr1yv"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake - qt5.qtbase - fftwFloat - boost - gnuradio - liquid-dsp - ]; - - meta = with stdenv.lib; { - description = "Tool for analysing captured signals from sdr receivers"; - homepage = https://github.com/miek/inspectrum; - maintainers = with maintainers; [ mog ]; - platforms = platforms.linux; - license = licenses.gpl3Plus; - }; -} diff --git a/pkgs/applications/misc/limesuite/default.nix b/pkgs/applications/misc/limesuite/default.nix deleted file mode 100644 index e1cdc4a0f863..000000000000 --- a/pkgs/applications/misc/limesuite/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake -, sqlite, wxGTK30, libusb1, soapysdr -, mesa_glu, libX11, gnuplot, fltk -} : - -let - version = "18.10.0"; - -in stdenv.mkDerivation { - name = "limesuite-${version}"; - - src = fetchFromGitHub { - owner = "myriadrf"; - repo = "LimeSuite"; - rev = "v${version}"; - sha256 = "0nbyvcdwvfvln1wic9qwb7y221v3jv454gp5v6ms9112a41zj46h"; - }; - - enableParallelBuilding = true; - - nativeBuildInputs = [ cmake ]; - - buildInputs = [ - libusb1 - sqlite - wxGTK30 - fltk - gnuplot - libusb1 - soapysdr - mesa_glu - libX11 - ]; - - postInstall = '' - mkdir -p $out/lib/udev/rules.d - cp ../udev-rules/64-limesuite.rules $out/lib/udev/rules.d - - mkdir -p $out/share/limesuite - cp bin/Release/lms7suite_mcu/* $out/share/limesuite - ''; - - meta = with stdenv.lib; { - description = "Driver and GUI for LMS7002M-based SDR platforms"; - homepage = https://github.com/myriadrf/LimeSuite; - license = licenses.asl20; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} - diff --git a/pkgs/applications/misc/multimon-ng/default.nix b/pkgs/applications/misc/multimon-ng/default.nix deleted file mode 100644 index b58872975aea..000000000000 --- a/pkgs/applications/misc/multimon-ng/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ stdenv, fetchFromGitHub, qt4, qmake4Hook, libpulseaudio }: -let - version = "1.1.7"; -in -stdenv.mkDerivation { - name = "multimon-ng-${version}"; - - src = fetchFromGitHub { - owner = "EliasOenal"; - repo = "multimon-ng"; - rev = "${version}"; - sha256 = "11wfk8jw86z44y0ji4jr4s8ig3zwxp6g9h3sl81pvk6l3ipqqbgi"; - }; - - buildInputs = [ qt4 libpulseaudio ]; - - nativeBuildInputs = [ qmake4Hook ]; - - qmakeFlags = [ "multimon-ng.pro" ]; - - installPhase = '' - mkdir -p $out/bin - cp multimon-ng $out/bin - ''; - - meta = with stdenv.lib; { - description = "Multimon is a digital baseband audio protocol decoder"; - longDescription = '' - multimon-ng a fork of multimon, a digital baseband audio - protocol decoder for common signaling modes in commercial and - amateur radio data services. It decodes the following digital - transmission modes: - - POCSAG512 POCSAG1200 POCSAG2400 EAS UFSK1200 CLIPFSK AFSK1200 - AFSK2400 AFSK2400_2 AFSK2400_3 HAPN4800 FSK9600 DTMF ZVEI1 ZVEI2 - ZVEI3 DZVEI PZVEI EEA EIA CCIR MORSE CW - ''; - homepage = https://github.com/EliasOenal/multimon-ng; - license = licenses.gpl2; - platforms = platforms.linux; - maintainers = with maintainers; [ the-kenny ]; - }; -} diff --git a/pkgs/applications/misc/qradiolink/default.nix b/pkgs/applications/misc/qradiolink/default.nix deleted file mode 100644 index 63906d996ba6..000000000000 --- a/pkgs/applications/misc/qradiolink/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ stdenv, fetchFromGitHub, alsaLib, boost -, qt4, libpulseaudio, codec2, libconfig -, gnuradio, gnuradio-osmosdr, gsm -, libopus, libjpeg, protobuf, qwt, speex -} : - -let - version = "0.5.0"; - -in stdenv.mkDerivation { - name = "qradiolink-${version}"; - - src = fetchFromGitHub { - owner = "kantooon"; - repo = "qradiolink"; - rev = "${version}"; - sha256 = "0xhg5zhjznmls5m3rhpk1qx0dipxmca12s85w15d0i7qwva2f1gi"; - }; - - preBuild = '' - cd ext - protoc --cpp_out=. Mumble.proto - protoc --cpp_out=. QRadioLink.proto - cd .. - qmake - ''; - - installPhase = '' - mkdir -p $out/bin - cp qradiolink $out/bin - ''; - - buildInputs = [ - qt4 - alsaLib - boost - libpulseaudio - codec2 - libconfig - gsm - gnuradio - gnuradio-osmosdr - libopus - libjpeg - protobuf - speex - qwt - ]; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "SDR transceiver application for analog and digital modes"; - homepage = http://qradiolink.org/; - license = licenses.agpl3; - maintainers = [ maintainers.markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/qsstv/default.nix b/pkgs/applications/misc/qsstv/default.nix deleted file mode 100644 index c8401cdbf49e..000000000000 --- a/pkgs/applications/misc/qsstv/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ stdenv, fetchurl, qtbase, qmake, makeDesktopItem, openjpeg, pkgconfig, fftw, - libpulseaudio, alsaLib, hamlib, libv4l, fftwFloat }: - -stdenv.mkDerivation rec { - version = "9.2.6"; - name = "qsstv-${version}"; - - src = fetchurl { - url = "http://users.telenet.be/on4qz/qsstv/downloads/qsstv_${version}.tar.gz"; - sha256 = "0sx70yk389fq5djvjwnam6ics5knmg9b5x608bk2sjbfxkila108"; - }; - - enableParallelBuilding = true; - - nativeBuildInputs = [ - qmake - pkgconfig - ]; - - buildInputs = [ qtbase openjpeg fftw libpulseaudio alsaLib hamlib libv4l - fftwFloat ]; - - desktopItem = makeDesktopItem { - name = "QSSTV"; - exec = "qsstv"; - icon = "qsstv.png"; - comment = "Qt-based slow-scan TV and fax"; - desktopName = "QSSTV"; - genericName = "qsstv"; - categories = "Application;HamRadio;"; - }; - - installPhase = '' - # Install binary to the right location - make install INSTALL_ROOT=$out - mv $out/usr/bin $out/ - rm -r $out/usr - - # Install desktop icon - install -D qsstv/icons/qsstv.png $out/share/pixmaps/qsstv.png - - # Install desktop item - cp -rv ${desktopItem}/share $out - ''; - - meta = with stdenv.lib; { - description = "Qt-based slow-scan TV and fax"; - homepage = http://users.telenet.be/on4qz/; - platforms = platforms.linux; - license = stdenv.lib.licenses.gpl3; - maintainers = with stdenv.lib.maintainers; [ hax404 ]; - }; -} - diff --git a/pkgs/applications/misc/rtl-sdr/default.nix b/pkgs/applications/misc/rtl-sdr/default.nix deleted file mode 100644 index aedc847ee69f..000000000000 --- a/pkgs/applications/misc/rtl-sdr/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ stdenv, lib, fetchpatch, fetchgit, cmake, pkgconfig, libusb1 }: - -stdenv.mkDerivation rec { - name = "rtl-sdr-${version}"; - version = "0.6.0"; - - src = fetchgit { - url = "git://git.osmocom.org/rtl-sdr.git"; - rev = "refs/tags/${version}"; - sha256 = "0lmvsnb4xw4hmz6zs0z5ilsah5hjz29g1s0050n59fllskqr3b8k"; - }; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ cmake libusb1 ]; - - # TODO: get these fixes upstream: - # * Building with -DINSTALL_UDEV_RULES=ON tries to install udev rules to - # /etc/udev/rules.d/, and there is no option to install elsewhere. So install - # rules manually. - # * Propagate libusb-1.0 dependency in pkg-config file. - postInstall = stdenv.lib.optionalString stdenv.isLinux '' - mkdir -p "$out/etc/udev/rules.d/" - cp ../rtl-sdr.rules "$out/etc/udev/rules.d/99-rtl-sdr.rules" - - pcfile="$out"/lib/pkgconfig/librtlsdr.pc - grep -q "Requires:" "$pcfile" && { echo "Upstream has added 'Requires:' in $(basename "$pcfile"); update nix expression."; exit 1; } - echo "Requires: libusb-1.0" >> "$pcfile" - ''; - - meta = with stdenv.lib; { - description = "Turns your Realtek RTL2832 based DVB dongle into a SDR receiver"; - homepage = http://sdr.osmocom.org/trac/wiki/rtl-sdr; - license = licenses.gpl2Plus; - platforms = platforms.linux ++ platforms.darwin; - maintainers = [ maintainers.bjornfor ]; - }; -} diff --git a/pkgs/applications/misc/rtl_433/default.nix b/pkgs/applications/misc/rtl_433/default.nix deleted file mode 100644 index 5d012437e6ee..000000000000 --- a/pkgs/applications/misc/rtl_433/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, libusb1, rtl-sdr }: -stdenv.mkDerivation rec { - - version = "18.12"; - name = "rtl_433-${version}"; - - src = fetchFromGitHub { - owner = "merbanan"; - repo = "rtl_433"; - rev = "18.12"; - sha256 = "0y73g9ffpsgnmfk8lbihyl9d1fd9v91wsn8k8xhsdmgmn4ra1jk5"; - }; - - nativeBuildInputs = [ autoreconfHook pkgconfig ]; - - buildInputs = [ libusb1 rtl-sdr ]; - - meta = with stdenv.lib; { - description = "Decode traffic from devices that broadcast on 433.9 MHz"; - homepage = https://github.com/merbanan/rtl_433; - license = licenses.gpl2; - maintainers = with maintainers; [ earldouglas ]; - platforms = platforms.all; - }; - -} diff --git a/pkgs/applications/misc/soapyairspy/default.nix b/pkgs/applications/misc/soapyairspy/default.nix deleted file mode 100644 index 1d8056ca1e81..000000000000 --- a/pkgs/applications/misc/soapyairspy/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake -, airspy, soapysdr -} : - -let - version = "0.1.2"; - -in stdenv.mkDerivation { - name = "soapyairspy-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyAirspy"; - rev = "soapy-airspy-${version}"; - sha256 = "061r77vs6ywxbxfif12y6v5xkz6gcvbz9k060q12vmdh6sisdwk2"; - }; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ airspy soapysdr ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyAirspy; - description = "SoapySDR plugin for Airspy devices"; - license = licenses.mit; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapybladerf/default.nix b/pkgs/applications/misc/soapybladerf/default.nix deleted file mode 100644 index bab829e05e3a..000000000000 --- a/pkgs/applications/misc/soapybladerf/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, libbladeRF, soapysdr -} : - -let - version = "0.4.0"; - -in stdenv.mkDerivation { - name = "soapybladerf-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyBladeRF"; - rev = "soapy-bladerf-${version}"; - sha256 = "1gf1azfydw033nlg2bgs9cbsbp9npjdrgjwlsffn0d9x0qbgxjqp"; - }; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ libbladeRF soapysdr ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyBladeRF; - description = "SoapySDR plugin for BladeRF devices"; - license = licenses.lgpl21; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapyhackrf/default.nix b/pkgs/applications/misc/soapyhackrf/default.nix deleted file mode 100644 index 2c5dd058ced3..000000000000 --- a/pkgs/applications/misc/soapyhackrf/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, hackrf, soapysdr -} : - -let - version = "0.3.3"; - -in stdenv.mkDerivation { - name = "soapyhackrf-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyHackRF"; - rev = "soapy-hackrf-${version}"; - sha256 = "1awn89z462500gb3fjb7x61b1znkjri9n1d39bqfip1qk4s11pxc"; - }; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ hackrf soapysdr ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyHackRF; - description = "SoapySDR plugin for HackRF devices"; - license = licenses.mit; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapyremote/default.nix b/pkgs/applications/misc/soapyremote/default.nix deleted file mode 100644 index f6970c156b8f..000000000000 --- a/pkgs/applications/misc/soapyremote/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, soapysdr, avahi }: - -let - version = "0.5.0"; - -in stdenv.mkDerivation { - name = "soapyremote-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyRemote"; - rev = "soapy-remote-${version}"; - sha256 = "1lyjhf934zap61ky7rbk46bp8s8sjk8sgdyszhryfyf571jv9b2i"; - }; - - nativeBuildInputs = [ cmake ]; - buildInputs = [ soapysdr avahi ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyRemote; - description = "SoapySDR plugin for remote access to SDRs"; - license = licenses.boost; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapyrtlsdr/default.nix b/pkgs/applications/misc/soapyrtlsdr/default.nix deleted file mode 100644 index d85fe347cd74..000000000000 --- a/pkgs/applications/misc/soapyrtlsdr/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, rtl-sdr, soapysdr -} : - -let - version = "0.3.0"; - -in stdenv.mkDerivation { - name = "soapyrtlsdr-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyRTLSDR"; - rev = "soapy-rtlsdr-${version}"; - sha256 = "15j0s7apbg9cjr6rcbr058kl0r3szwzf00ixcbykxb77fh7c6r9w"; - }; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ rtl-sdr soapysdr ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyRTLSDR; - description = "SoapySDR plugin for RTL-SDR devices"; - license = licenses.mit; - maintainers = with maintainers; [ ragge ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapysdr/default.nix b/pkgs/applications/misc/soapysdr/default.nix deleted file mode 100644 index 6754e8f2a55c..000000000000 --- a/pkgs/applications/misc/soapysdr/default.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ stdenv, lib, lndir, makeWrapper -, fetchFromGitHub, cmake -, libusb, pkgconfig -, python, swig2, numpy, ncurses -, extraPackages ? [] -} : - -let - - version = "0.7.1"; - modulesVersion = with lib; versions.major version + "." + versions.minor version; - modulesPath = "lib/SoapySDR/modules" + modulesVersion; - extraPackagesSearchPath = lib.makeSearchPath modulesPath extraPackages; - -in stdenv.mkDerivation { - name = "soapysdr-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapySDR"; - rev = "soapy-sdr-${version}"; - sha256 = "1rbnd3w12kzsh94fiywyn4vch7h0kf75m88fi6nq992b3vnmiwvl"; - }; - - nativeBuildInputs = [ cmake makeWrapper pkgconfig ]; - buildInputs = [ libusb ncurses numpy python swig2 ]; - - cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" - "-DUSE_PYTHON_CONFIG=ON" - ]; - - postFixup = lib.optionalString (lib.length extraPackages != 0) '' - # Join all plugins via symlinking - for i in ${toString extraPackages}; do - ${lndir}/bin/lndir -silent $i $out - done - # Needed for at least the remote plugin server - for file in $out/bin/*; do - wrapProgram "$file" --prefix SOAPY_SDR_PLUGIN_PATH : ${extraPackagesSearchPath} - done - ''; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapySDR; - description = "Vendor and platform neutral SDR support library"; - license = licenses.boost; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/soapyuhd/default.nix b/pkgs/applications/misc/soapyuhd/default.nix deleted file mode 100644 index 4f2a79c97fe2..000000000000 --- a/pkgs/applications/misc/soapyuhd/default.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, uhd, boost, soapysdr -} : - -let - version = "0.3.4"; - -in stdenv.mkDerivation { - name = "soapyuhd-${version}"; - - src = fetchFromGitHub { - owner = "pothosware"; - repo = "SoapyUHD"; - rev = "soapy-uhd-${version}"; - sha256 = "1da7cjcvfdqhgznm7x14s1h7lwz5lan1b48akw445ah1vxwvh4hl"; - }; - - nativeBuildInputs = [ cmake pkgconfig ]; - buildInputs = [ uhd boost soapysdr ]; - - cmakeFlags = [ "-DSoapySDR_DIR=${soapysdr}/share/cmake/SoapySDR/" ]; - - postPatch = '' - sed -i "s:DESTINATION .*uhd/modules:DESTINATION $out/lib/uhd/modules:" CMakeLists.txt - ''; - - meta = with stdenv.lib; { - homepage = https://github.com/pothosware/SoapyAirspy; - description = "SoapySDR plugin for UHD devices"; - license = licenses.gpl3; - maintainers = with maintainers; [ markuskowa ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/applications/misc/todoist/default.nix b/pkgs/applications/misc/todoist/default.nix new file mode 100644 index 000000000000..abe1fda23445 --- /dev/null +++ b/pkgs/applications/misc/todoist/default.nix @@ -0,0 +1,24 @@ +{ lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "todoist-${version}"; + version = "0.13.1"; + + goPackagePath = "github.com/sachaos/todoist"; + + src = fetchFromGitHub { + owner = "sachaos"; + repo = "todoist"; + rev = "v${version}"; + sha256 = "1kwvlsjr2a7wdhlwpxxpdh87wz8k9yjwl59vl2g7ya6m0rvhd3mc"; + }; + + goDeps = ./deps.nix; + + meta = { + homepage = https://github.com/sachaos/todoist; + description = "Todoist CLI Client"; + license = lib.licenses.mit; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/applications/misc/todoist/deps.nix b/pkgs/applications/misc/todoist/deps.nix new file mode 100644 index 000000000000..9b132e29c779 --- /dev/null +++ b/pkgs/applications/misc/todoist/deps.nix @@ -0,0 +1,237 @@ +# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) +[ + { + goPackagePath = "github.com/BurntSushi/toml"; + fetch = { + type = "git"; + url = "https://github.com/BurntSushi/toml"; + rev = "v0.3.1"; + sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; + }; + } + { + goPackagePath = "github.com/davecgh/go-spew"; + fetch = { + type = "git"; + url = "https://github.com/davecgh/go-spew"; + rev = "v1.1.1"; + sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; + }; + } + { + goPackagePath = "github.com/fatih/color"; + fetch = { + type = "git"; + url = "https://github.com/fatih/color"; + rev = "v1.7.0"; + sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv"; + }; + } + { + goPackagePath = "github.com/fsnotify/fsnotify"; + fetch = { + type = "git"; + url = "https://github.com/fsnotify/fsnotify"; + rev = "v1.4.7"; + sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; + }; + } + { + goPackagePath = "github.com/gofrs/uuid"; + fetch = { + type = "git"; + url = "https://github.com/gofrs/uuid"; + rev = "v3.2.0"; + sha256 = "1q63mp7bznhfgyw133c0wc0hpcj1cq9bcf7w1f8r6inkcrils1fz"; + }; + } + { + goPackagePath = "github.com/hashicorp/hcl"; + fetch = { + type = "git"; + url = "https://github.com/hashicorp/hcl"; + rev = "v1.0.0"; + sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66"; + }; + } + { + goPackagePath = "github.com/magiconair/properties"; + fetch = { + type = "git"; + url = "https://github.com/magiconair/properties"; + rev = "v1.8.0"; + sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn"; + }; + } + { + goPackagePath = "github.com/mattn/go-colorable"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-colorable"; + rev = "v0.0.9"; + sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx"; + }; + } + { + goPackagePath = "github.com/mattn/go-isatty"; + fetch = { + type = "git"; + url = "https://github.com/mattn/go-isatty"; + rev = "v0.0.4"; + sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; + }; + } + { + goPackagePath = "github.com/mitchellh/go-homedir"; + fetch = { + type = "git"; + url = "https://github.com/mitchellh/go-homedir"; + rev = "v1.0.0"; + sha256 = "0f0z0aa4wivk4z1y503dmnw0k0g0g403dly8i4q263gfshs82sbq"; + }; + } + { + goPackagePath = "github.com/mitchellh/mapstructure"; + fetch = { + type = "git"; + url = "https://github.com/mitchellh/mapstructure"; + rev = "v1.0.0"; + sha256 = "0f06q4fpzg0c370cvmpsl0iq2apl5nkbz5cd3nba5x5ysmshv1lm"; + }; + } + { + goPackagePath = "github.com/pelletier/go-toml"; + fetch = { + type = "git"; + url = "https://github.com/pelletier/go-toml"; + rev = "v1.2.0"; + sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy"; + }; + } + { + goPackagePath = "github.com/pkg/browser"; + fetch = { + type = "git"; + url = "https://github.com/pkg/browser"; + rev = "0a3d74bf9ce4"; + sha256 = "0lv6kwvm31n79mh14a63zslaf4l9bspi2q0i8i9im4njfl42iv1c"; + }; + } + { + goPackagePath = "github.com/pmezard/go-difflib"; + fetch = { + type = "git"; + url = "https://github.com/pmezard/go-difflib"; + rev = "v1.0.0"; + sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; + }; + } + { + goPackagePath = "github.com/spf13/afero"; + fetch = { + type = "git"; + url = "https://github.com/spf13/afero"; + rev = "v1.1.2"; + sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k"; + }; + } + { + goPackagePath = "github.com/spf13/cast"; + fetch = { + type = "git"; + url = "https://github.com/spf13/cast"; + rev = "v1.2.0"; + sha256 = "177bk7lq40jbgv9p9r80aydpaccfk8ja3a7jjhfwiwk9r1pa4rr2"; + }; + } + { + goPackagePath = "github.com/spf13/jwalterweatherman"; + fetch = { + type = "git"; + url = "https://github.com/spf13/jwalterweatherman"; + rev = "v1.0.0"; + sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8"; + }; + } + { + goPackagePath = "github.com/spf13/pflag"; + fetch = { + type = "git"; + url = "https://github.com/spf13/pflag"; + rev = "v1.0.2"; + sha256 = "005598piihl3l83a71ahj10cpq9pbhjck4xishx1b4dzc02r9xr2"; + }; + } + { + goPackagePath = "github.com/spf13/viper"; + fetch = { + type = "git"; + url = "https://github.com/spf13/viper"; + rev = "v1.2.1"; + sha256 = "0y7czxki8zhjhanh5ydnx4sf2darw70z2i5dskgarbk4gjmagx6k"; + }; + } + { + goPackagePath = "github.com/stretchr/testify"; + fetch = { + type = "git"; + url = "https://github.com/stretchr/testify"; + rev = "v1.2.2"; + sha256 = "0dlszlshlxbmmfxj5hlwgv3r22x0y1af45gn1vd198nvvs3pnvfs"; + }; + } + { + goPackagePath = "github.com/urfave/cli"; + fetch = { + type = "git"; + url = "https://github.com/urfave/cli"; + rev = "v1.20.0"; + sha256 = "0y6f4sbzkiiwrxbl15biivj8c7qwxnvm3zl2dd3mw4wzg4x10ygj"; + }; + } + { + goPackagePath = "golang.org/x/sys"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/sys"; + rev = "8cf3aee42992"; + sha256 = "1l2hyd5z91jzml5isn1i0g882pxbxk0x6ry5vdwghrprcx06syag"; + }; + } + { + goPackagePath = "golang.org/x/text"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/text"; + rev = "v0.3.0"; + sha256 = "0r6x6zjzhr8ksqlpiwm5gdd7s209kwk5p4lw54xjvz10cs3qlq19"; + }; + } + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "77439c55185e"; + sha256 = "15f7yghpw9yn00s1k8czld8cm3kvjx5rzda2gfm8pq5542i8w9rs"; + }; + } + { + goPackagePath = "gopkg.in/check.v1"; + fetch = { + type = "git"; + url = "https://gopkg.in/check.v1"; + rev = "20d25e280405"; + sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"; + }; + } + { + goPackagePath = "gopkg.in/yaml.v2"; + fetch = { + type = "git"; + url = "https://gopkg.in/yaml.v2"; + rev = "v2.2.1"; + sha256 = "0dwjrs2lp2gdlscs7bsrmyc5yf6mm4fvgw71bzr9mv2qrd2q73s1"; + }; + } +] diff --git a/pkgs/applications/misc/unixcw/default.nix b/pkgs/applications/misc/unixcw/default.nix deleted file mode 100644 index 2aeba5fb5f4a..000000000000 --- a/pkgs/applications/misc/unixcw/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{stdenv, fetchurl, libpulseaudio, alsaLib , pkgconfig, qt5}: -stdenv.mkDerivation rec { - name = "unixcw-${version}"; - version = "3.5.1"; - src = fetchurl { - url = "mirror://sourceforge/unixcw/unixcw_${version}.orig.tar.gz"; - sha256 ="5f3aacd8a26e16e6eff437c7ae1e9b389956fb137eeb3de24670ce05de479e7a"; - }; - patches = [ - ./remove-use-of-dlopen.patch - ]; - buildInputs = [libpulseaudio alsaLib pkgconfig qt5.qtbase]; - CFLAGS ="-lasound -lpulse-simple"; - - meta = with stdenv.lib; { - 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. - The programs are intended for people who want to learn receiving - and sending Morse code. - unixcw is developed and tested primarily on GNU/Linux system. - - cw reads characters from an input file, or from standard input, - and sounds each valid character as Morse code on either the system sound card, - or the system console speaker. - After it sounds a character, cw echoes it to standard output. - The input stream can contain embedded command strings. - These change the parameters used when sounding the Morse code. - cw reports any errors in embedded commands - ''; - homepage = "http://unixcw.sourceforge.net"; - maintainers = [ maintainers.mafo ]; - license = licenses.gpl2; - platforms=platforms.linux; - }; -} diff --git a/pkgs/applications/misc/unixcw/remove-use-of-dlopen.patch b/pkgs/applications/misc/unixcw/remove-use-of-dlopen.patch deleted file mode 100644 index 0475c008ba22..000000000000 --- a/pkgs/applications/misc/unixcw/remove-use-of-dlopen.patch +++ /dev/null @@ -1,677 +0,0 @@ -From e4b91b5a7943a3b54f555ff2e0029b83bd96b131 Mon Sep 17 00:00:00 2001 -From: MarcFontaine <MarcFontaine@users.noreply.github.com> -Date: Sat, 9 Jun 2018 11:02:11 +0200 -Subject: [PATCH] remove use of dlopen - ---- - src/libcw/libcw_alsa.c | 215 ++++++++++--------------------------------------- - src/libcw/libcw_pa.c | 118 ++++----------------------- - 2 files changed, 56 insertions(+), 277 deletions(-) - -diff --git a/src/libcw/libcw_alsa.c b/src/libcw/libcw_alsa.c -index a669c6e..17c306d 100644 ---- a/src/libcw/libcw_alsa.c -+++ b/src/libcw/libcw_alsa.c -@@ -35,7 +35,6 @@ - - - --#include <dlfcn.h> /* dlopen() and related symbols */ - #include <alsa/asoundlib.h> - - -@@ -65,7 +64,6 @@ static const snd_pcm_format_t CW_ALSA_SAMPLE_FORMAT = SND_PCM_FORMAT_S16; /* "Si - - - static int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *params); --static int cw_alsa_dlsym_internal(void *handle); - static int cw_alsa_write_internal(cw_gen_t *gen); - static int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv); - static int cw_alsa_open_device_internal(cw_gen_t *gen); -@@ -80,56 +78,6 @@ static int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params); - - - --static struct { -- void *handle; -- -- int (* snd_pcm_open)(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode); -- int (* snd_pcm_close)(snd_pcm_t *pcm); -- int (* snd_pcm_prepare)(snd_pcm_t *pcm); -- int (* snd_pcm_drop)(snd_pcm_t *pcm); -- snd_pcm_sframes_t (* snd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size); -- -- const char *(* snd_strerror)(int errnum); -- -- int (* snd_pcm_hw_params_malloc)(snd_pcm_hw_params_t **ptr); -- int (* snd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -- int (* snd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val); -- int (* snd_pcm_hw_params_set_rate_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir); -- int (* snd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access); -- int (* snd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val); -- int (* snd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params); -- int (* snd_pcm_hw_params_get_periods)(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir); -- int (* snd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir); -- int (* snd_pcm_hw_params_get_period_size_min)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir); -- int (* snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val); --} cw_alsa = { -- .handle = NULL, -- -- .snd_pcm_open = NULL, -- .snd_pcm_close = NULL, -- .snd_pcm_prepare = NULL, -- .snd_pcm_drop = NULL, -- .snd_pcm_writei = NULL, -- -- .snd_strerror = NULL, -- -- .snd_pcm_hw_params_malloc = NULL, -- .snd_pcm_hw_params_any = NULL, -- .snd_pcm_hw_params_set_format = NULL, -- .snd_pcm_hw_params_set_rate_near = NULL, -- .snd_pcm_hw_params_set_access = NULL, -- .snd_pcm_hw_params_set_channels = NULL, -- .snd_pcm_hw_params = NULL, -- .snd_pcm_hw_params_get_periods = NULL, -- .snd_pcm_hw_params_get_period_size = NULL, -- .snd_pcm_hw_params_get_period_size_min = NULL, -- .snd_pcm_hw_params_get_buffer_size = NULL --}; -- -- -- -- -- - - /** - \brief Check if it is possible to open ALSA output -@@ -144,34 +92,19 @@ static struct { - */ - bool cw_is_alsa_possible(const char *device) - { -- const char *library_name = "libasound.so.2"; -- if (!cw_dlopen_internal(library_name, &(cw_alsa.handle))) { -- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't access ALSA library \"%s\"", library_name); -- return false; -- } -- -- int rv = cw_alsa_dlsym_internal(cw_alsa.handle); -- if (rv < 0) { -- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: failed to resolve ALSA symbol #%d, can't correctly load ALSA library", rv); -- dlclose(cw_alsa.handle); -- return false; -- } -- -- const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE; -+ int rv; -+ const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE; - snd_pcm_t *alsa_handle; -- rv = cw_alsa.snd_pcm_open(&alsa_handle, -+ rv = snd_pcm_open(&alsa_handle, - dev, /* name */ - SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */ - 0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */ - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, - "cw_alsa: can't open ALSA device \"%s\"", dev); -- dlclose(cw_alsa.handle); - return false; - } else { -- cw_alsa.snd_pcm_close(alsa_handle); -+ snd_pcm_close(alsa_handle); - return true; - } - } -@@ -204,7 +137,7 @@ int cw_alsa_write_internal(cw_gen_t *gen) - /* Send audio buffer to ALSA. - Size of correct and current data in the buffer is the same as - ALSA's period, so there should be no underruns */ -- int rv = cw_alsa.snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples); -+ int rv = snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples); - cw_alsa_debug_evaluate_write_internal(gen, rv); - /* - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, -@@ -231,7 +164,7 @@ int cw_alsa_write_internal(cw_gen_t *gen) - */ - int cw_alsa_open_device_internal(cw_gen_t *gen) - { -- int rv = cw_alsa.snd_pcm_open(&gen->alsa_data.handle, -+ int rv = snd_pcm_open(&gen->alsa_data.handle, - gen->audio_device, /* name */ - SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */ - 0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */ -@@ -251,7 +184,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen) - /* TODO: move this to cw_alsa_set_hw_params_internal(), - deallocate hw_params */ - snd_pcm_hw_params_t *hw_params = NULL; -- rv = cw_alsa.snd_pcm_hw_params_malloc(&hw_params); -+ rv = snd_pcm_hw_params_malloc(&hw_params); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, - "cw_alsa: can't allocate memory for ALSA hw params"); -@@ -265,7 +198,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen) - return CW_FAILURE; - } - -- rv = cw_alsa.snd_pcm_prepare(gen->alsa_data.handle); -+ rv = snd_pcm_prepare(gen->alsa_data.handle); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, - "cw_alsa: can't prepare ALSA handler"); -@@ -275,7 +208,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen) - /* Get size for data buffer */ - snd_pcm_uframes_t frames; /* period size in frames */ - int dir = 1; -- rv = cw_alsa.snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir); -+ rv = snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir); - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: rv = %d, ALSA buffer size would be %u frames", rv, (unsigned int) frames); - -@@ -305,14 +238,11 @@ int cw_alsa_open_device_internal(cw_gen_t *gen) - void cw_alsa_close_device_internal(cw_gen_t *gen) - { - /* "Stop a PCM dropping pending frames. " */ -- cw_alsa.snd_pcm_drop(gen->alsa_data.handle); -- cw_alsa.snd_pcm_close(gen->alsa_data.handle); -+ snd_pcm_drop(gen->alsa_data.handle); -+ snd_pcm_close(gen->alsa_data.handle); - - gen->audio_device_is_open = false; - -- if (cw_alsa.handle) { -- dlclose(cw_alsa.handle); -- } - - #if CW_DEV_RAW_SINK - if (gen->dev_raw_sink != -1) { -@@ -332,11 +262,11 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv) - if (rv == -EPIPE) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, - "cw_alsa: underrun"); -- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle); -+ snd_pcm_prepare(gen->alsa_data.handle); - } else if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, -- "cw_alsa: writei: %s", cw_alsa.snd_strerror(rv)); -- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle); -+ "cw_alsa: writei: %s", snd_strerror(rv)); -+ snd_pcm_prepare(gen->alsa_data.handle); - } else if (rv != gen->buffer_n_samples) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, - "cw_alsa: short write, %d != %d", rv, gen->buffer_n_samples); -@@ -363,19 +293,19 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv) - int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params) - { - /* Get current hw configuration. */ -- int rv = cw_alsa.snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params); -+ int rv = snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: get current hw params: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: get current hw params: %s", snd_strerror(rv)); - return CW_FAILURE; - } - - - /* Set the sample format */ -- rv = cw_alsa.snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT); -+ rv = snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't set sample format: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't set sample format: %s", snd_strerror(rv)); - return CW_FAILURE; - } - -@@ -387,7 +317,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - bool success = false; - for (int i = 0; cw_supported_sample_rates[i]; i++) { - rate = cw_supported_sample_rates[i]; -- int rv = cw_alsa.snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir); -+ int rv = snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir); - if (!rv) { - if (rate != cw_supported_sample_rates[i]) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, "cw_alsa: imprecise sample rate:"); -@@ -402,7 +332,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - - if (!success) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't get sample rate: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't get sample rate: %s", snd_strerror(rv)); - return CW_FAILURE; - } else { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, -@@ -410,18 +340,18 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - } - - /* Set PCM access type */ -- rv = cw_alsa.snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED); -+ rv = snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't set access type: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't set access type: %s", snd_strerror(rv)); - return CW_FAILURE; - } - - /* Set number of channels */ -- rv = cw_alsa.snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS); -+ rv = snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't set number of channels: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't set number of channels: %s", snd_strerror(rv)); - return CW_FAILURE; - } - -@@ -496,7 +426,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - snd_pcm_uframes_t accepted = 0; /* buffer size in frames */ - dir = 0; - for (snd_pcm_uframes_t val = 0; val < 10000; val++) { -- rv = cw_alsa.snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val); -+ rv = snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val); - if (rv == 0) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: accepted buffer size: %u", (unsigned int) accepted); -@@ -507,10 +437,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - } - - if (accepted > 0) { -- rv = cw_alsa.snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted); -+ rv = snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, snd_strerror(rv)); - } - } else { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -@@ -526,7 +456,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - /* this limit should be enough, "accepted" on my machine is 8 */ - const unsigned int n_periods_max = 30; - for (unsigned int val = 1; val < n_periods_max; val++) { -- rv = cw_alsa.snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir); -+ rv = snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir); - if (rv == 0) { - accepted = val; - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, -@@ -534,10 +464,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - } - } - if (accepted > 0) { -- rv = cw_alsa.snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir); -+ rv = snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't set accepted number of periods %d: %s", accepted, cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't set accepted number of periods %d: %s", accepted, snd_strerror(rv)); - } - } else { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -@@ -549,7 +479,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - /* Test period size */ - dir = 0; - for (snd_pcm_uframes_t val = 0; val < 100000; val++) { -- rv = cw_alsa.snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir); -+ rv = snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir); - if (rv == 0) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: accepted period size: %lu", val); -@@ -562,7 +492,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - /* Test buffer time */ - dir = 0; - for (unsigned int val = 0; val < 100000; val++) { -- rv = cw_alsa.snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir); -+ rv = snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir); - if (rv == 0) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: accepted buffer time: %d", val); -@@ -573,10 +503,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params - #endif /* #if CW_ALSA_HW_BUFFER_CONFIG */ - - /* Save hw parameters to device */ -- rv = cw_alsa.snd_pcm_hw_params(gen->alsa_data.handle, hw_params); -+ rv = snd_pcm_hw_params(gen->alsa_data.handle, hw_params); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't save hw parameters: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't save hw parameters: %s", snd_strerror(rv)); - return CW_FAILURE; - } else { - return CW_SUCCESS; -@@ -600,30 +530,30 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params) - unsigned int val = 0; - int dir = 0; - -- int rv = cw_alsa.snd_pcm_hw_params_get_periods(hw_params, &val, &dir); -+ int rv = snd_pcm_hw_params_get_periods(hw_params, &val, &dir); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't get 'periods': %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't get 'periods': %s", snd_strerror(rv)); - } else { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: 'periods' = %u", val); - } - - snd_pcm_uframes_t period_size = 0; -- rv = cw_alsa.snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir); -+ rv = snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't get 'period size': %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't get 'period size': %s", snd_strerror(rv)); - } else { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: 'period size' = %u", (unsigned int) period_size); - } - - snd_pcm_uframes_t buffer_size; -- rv = cw_alsa.snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size); -+ rv = snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "cw_alsa: can't get buffer size: %s", cw_alsa.snd_strerror(rv)); -+ "cw_alsa: can't get buffer size: %s", snd_strerror(rv)); - } else { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, - "cw_alsa: 'buffer size' = %u", (unsigned int) buffer_size); -@@ -642,70 +572,9 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params) - - - --/** -- \brief Resolve/get symbols from ALSA library -- -- Function resolves/gets addresses of few ALSA functions used by -- libcw and stores them in cw_alsa global variable. -- -- On failure the function returns negative value, different for every -- symbol that the funciton failed to resolve. Function stops and returns -- on first failure. -- -- \param handle - handle to open ALSA library -- -- \return 0 on success -- \return negative value on failure --*/ --static int cw_alsa_dlsym_internal(void *handle) --{ -- *(void **) &(cw_alsa.snd_pcm_open) = dlsym(handle, "snd_pcm_open"); -- if (!cw_alsa.snd_pcm_open) return -1; -- *(void **) &(cw_alsa.snd_pcm_close) = dlsym(handle, "snd_pcm_close"); -- if (!cw_alsa.snd_pcm_close) return -2; -- *(void **) &(cw_alsa.snd_pcm_prepare) = dlsym(handle, "snd_pcm_prepare"); -- if (!cw_alsa.snd_pcm_prepare) return -3; -- *(void **) &(cw_alsa.snd_pcm_drop) = dlsym(handle, "snd_pcm_drop"); -- if (!cw_alsa.snd_pcm_drop) return -4; -- *(void **) &(cw_alsa.snd_pcm_writei) = dlsym(handle, "snd_pcm_writei"); -- if (!cw_alsa.snd_pcm_writei) return -5; -- -- *(void **) &(cw_alsa.snd_strerror) = dlsym(handle, "snd_strerror"); -- if (!cw_alsa.snd_strerror) return -10; -- -- *(void **) &(cw_alsa.snd_pcm_hw_params_malloc) = dlsym(handle, "snd_pcm_hw_params_malloc"); -- if (!cw_alsa.snd_pcm_hw_params_malloc) return -20; -- *(void **) &(cw_alsa.snd_pcm_hw_params_any) = dlsym(handle, "snd_pcm_hw_params_any"); -- if (!cw_alsa.snd_pcm_hw_params_any) return -21; -- *(void **) &(cw_alsa.snd_pcm_hw_params_set_format) = dlsym(handle, "snd_pcm_hw_params_set_format"); -- if (!cw_alsa.snd_pcm_hw_params_set_format) return -22; -- *(void **) &(cw_alsa.snd_pcm_hw_params_set_rate_near) = dlsym(handle, "snd_pcm_hw_params_set_rate_near"); -- if (!cw_alsa.snd_pcm_hw_params_set_rate_near) return -23; -- *(void **) &(cw_alsa.snd_pcm_hw_params_set_access) = dlsym(handle, "snd_pcm_hw_params_set_access"); -- if (!cw_alsa.snd_pcm_hw_params_set_access) return -24; -- *(void **) &(cw_alsa.snd_pcm_hw_params_set_channels) = dlsym(handle, "snd_pcm_hw_params_set_channels"); -- if (!cw_alsa.snd_pcm_hw_params_set_channels) return -25; -- *(void **) &(cw_alsa.snd_pcm_hw_params) = dlsym(handle, "snd_pcm_hw_params"); -- if (!cw_alsa.snd_pcm_hw_params) return -26; -- *(void **) &(cw_alsa.snd_pcm_hw_params_get_periods) = dlsym(handle, "snd_pcm_hw_params_get_periods"); -- if (!cw_alsa.snd_pcm_hw_params_get_periods) return -27; -- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size) = dlsym(handle, "snd_pcm_hw_params_get_period_size"); -- if (!cw_alsa.snd_pcm_hw_params_get_period_size) return -28; -- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size_min) = dlsym(handle, "snd_pcm_hw_params_get_period_size_min"); -- if (!cw_alsa.snd_pcm_hw_params_get_period_size_min) return -29; -- *(void **) &(cw_alsa.snd_pcm_hw_params_get_buffer_size) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size"); -- if (!cw_alsa.snd_pcm_hw_params_get_buffer_size) return -30; -- -- return 0; --} -- -- -- -- -- - void cw_alsa_drop(cw_gen_t *gen) - { -- cw_alsa.snd_pcm_drop(gen->alsa_data.handle); -+ snd_pcm_drop(gen->alsa_data.handle); - - return; - } -@@ -721,7 +590,7 @@ void cw_alsa_drop(cw_gen_t *gen) - - - #include <stdbool.h> --#include "libcw_alsa.h" -+#include "libh" - - - -diff --git a/src/libcw/libcw_pa.c b/src/libcw/libcw_pa.c -index 8269e9d..e190200 100644 ---- a/src/libcw/libcw_pa.c -+++ b/src/libcw/libcw_pa.c -@@ -39,7 +39,6 @@ - #include <unistd.h> - #include <stdlib.h> - #include <stdbool.h> --#include <dlfcn.h> /* dlopen() and related symbols */ - #include <string.h> - #include <assert.h> - #include <sys/types.h> -@@ -63,39 +62,12 @@ extern cw_debug_t cw_debug_object_dev; - - - static pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, const char *device, const char *stream_name, int *error); --static int cw_pa_dlsym_internal(void *handle); - static int cw_pa_open_device_internal(cw_gen_t *gen); - static void cw_pa_close_device_internal(cw_gen_t *gen); - static int cw_pa_write_internal(cw_gen_t *gen); - - - --static struct { -- void *handle; -- -- pa_simple *(* pa_simple_new)(const char *server, const char *name, pa_stream_direction_t dir, const char *dev, const char *stream_name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_buffer_attr *attr, int *error); -- void (* pa_simple_free)(pa_simple *s); -- int (* pa_simple_write)(pa_simple *s, const void *data, size_t bytes, int *error); -- pa_usec_t (* pa_simple_get_latency)(pa_simple *s, int *error); -- int (* pa_simple_drain)(pa_simple *s, int *error); -- -- size_t (* pa_usec_to_bytes)(pa_usec_t t, const pa_sample_spec *spec); -- char *(* pa_strerror)(int error); --} cw_pa = { -- .handle = NULL, -- -- .pa_simple_new = NULL, -- .pa_simple_free = NULL, -- .pa_simple_write = NULL, -- .pa_simple_get_latency = NULL, -- .pa_simple_drain = NULL, -- -- .pa_usec_to_bytes = NULL, -- .pa_strerror = NULL --}; -- -- -- - - static const pa_sample_format_t CW_PA_SAMPLE_FORMAT = PA_SAMPLE_S16LE; /* Signed 16 bit, Little Endian */ - static const int CW_PA_BUFFER_N_SAMPLES = 1024; -@@ -117,21 +89,6 @@ static const int CW_PA_BUFFER_N_SAMPLES = 1024; - */ - bool cw_is_pa_possible(const char *device) - { -- const char *library_name = "libpulse-simple.so"; -- if (!cw_dlopen_internal(library_name, &(cw_pa.handle))) { -- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: can't access PulseAudio library \"%s\"", library_name); -- return false; -- } -- -- int rv = cw_pa_dlsym_internal(cw_pa.handle); -- if (rv < 0) { -- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: failed to resolve PulseAudio symbol #%d, can't correctly load PulseAudio library", rv); -- dlclose(cw_pa.handle); -- return false; -- } -- - const char *dev = (char *) NULL; - if (device && strcmp(device, CW_DEFAULT_PA_DEVICE)) { - dev = device; -@@ -145,13 +102,10 @@ bool cw_is_pa_possible(const char *device) - - if (!s) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error)); -- if (cw_pa.handle) { -- dlclose(cw_pa.handle); -- } -+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error)); - return false; - } else { -- cw_pa.pa_simple_free(s); -+ pa_simple_free(s); - s = NULL; - return true; - } -@@ -186,10 +140,10 @@ int cw_pa_write_internal(cw_gen_t *gen) - - int error = 0; - size_t n_bytes = sizeof (gen->buffer[0]) * gen->buffer_n_samples; -- int rv = cw_pa.pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error); -+ int rv = pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error); - if (rv < 0) { - cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: pa_simple_write() failed: %s", cw_pa.pa_strerror(error)); -+ "libcw_pa: pa_simple_write() failed: %s", pa_strerror(error)); - } else { - //cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, "libcw_pa: written %d samples with PulseAudio", gen->buffer_n_samples); - } -@@ -237,13 +191,13 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con - } - - // http://www.mail-archive.com/pulseaudio-tickets@mail.0pointer.de/msg03295.html -- ba->tlength = cw_pa.pa_usec_to_bytes(50*1000, ss); -- ba->minreq = cw_pa.pa_usec_to_bytes(0, ss); -- ba->maxlength = cw_pa.pa_usec_to_bytes(50*1000, ss); -+ ba->tlength = pa_usec_to_bytes(50*1000, ss); -+ ba->minreq = pa_usec_to_bytes(0, ss); -+ ba->maxlength = pa_usec_to_bytes(50*1000, ss); - /* ba->prebuf = ; */ /* ? */ - /* ba->fragsize = sizeof(uint32_t) -1; */ /* not relevant to playback */ - -- pa_simple *s = cw_pa.pa_simple_new(NULL, /* server name (NULL for default) */ -+ pa_simple *s = pa_simple_new(NULL, /* server name (NULL for default) */ - "libcw", /* descriptive name of client (application name etc.) */ - PA_STREAM_PLAYBACK, /* stream direction */ - dev, /* device/sink name (NULL for default) */ -@@ -258,47 +212,6 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con - - - -- -- --/** -- \brief Resolve/get symbols from PulseAudio library -- -- Function resolves/gets addresses of few PulseAudio functions used by -- libcw and stores them in cw_pa global variable. -- -- On failure the function returns negative value, different for every -- symbol that the funciton failed to resolve. Function stops and returns -- on first failure. -- -- \param handle - handle to open PulseAudio library -- -- \return 0 on success -- \return negative value on failure --*/ --int cw_pa_dlsym_internal(void *handle) --{ -- *(void **) &(cw_pa.pa_simple_new) = dlsym(handle, "pa_simple_new"); -- if (!cw_pa.pa_simple_new) return -1; -- *(void **) &(cw_pa.pa_simple_free) = dlsym(handle, "pa_simple_free"); -- if (!cw_pa.pa_simple_free) return -2; -- *(void **) &(cw_pa.pa_simple_write) = dlsym(handle, "pa_simple_write"); -- if (!cw_pa.pa_simple_write) return -3; -- *(void **) &(cw_pa.pa_strerror) = dlsym(handle, "pa_strerror"); -- if (!cw_pa.pa_strerror) return -4; -- *(void **) &(cw_pa.pa_simple_get_latency) = dlsym(handle, "pa_simple_get_latency"); -- if (!cw_pa.pa_simple_get_latency) return -5; -- *(void **) &(cw_pa.pa_simple_drain) = dlsym(handle, "pa_simple_drain"); -- if (!cw_pa.pa_simple_drain) return -6; -- *(void **) &(cw_pa.pa_usec_to_bytes) = dlsym(handle, "pa_usec_to_bytes"); -- if (!cw_pa.pa_usec_to_bytes) return -7; -- -- return 0; --} -- -- -- -- -- - /** - \brief Open PulseAudio output, associate it with given generator - -@@ -325,16 +238,16 @@ int cw_pa_open_device_internal(cw_gen_t *gen) - - if (!gen->pa_data.s) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error)); -+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error)); - return false; - } - - gen->buffer_n_samples = CW_PA_BUFFER_N_SAMPLES; - gen->sample_rate = gen->pa_data.ss.rate; - -- if ((gen->pa_data.latency_usecs = cw_pa.pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) { -+ if ((gen->pa_data.latency_usecs = pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: pa_simple_get_latency() failed: %s", cw_pa.pa_strerror(error)); -+ "libcw_pa: pa_simple_get_latency() failed: %s", pa_strerror(error)); - } - - #if CW_DEV_RAW_SINK -@@ -357,20 +270,17 @@ void cw_pa_close_device_internal(cw_gen_t *gen) - if (gen->pa_data.s) { - /* Make sure that every single sample was played */ - int error; -- if (cw_pa.pa_simple_drain(gen->pa_data.s, &error) < 0) { -+ if (pa_simple_drain(gen->pa_data.s, &error) < 0) { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, -- "libcw_pa: pa_simple_drain() failed: %s", cw_pa.pa_strerror(error)); -+ "libcw_pa: pa_simple_drain() failed: %s", pa_strerror(error)); - } -- cw_pa.pa_simple_free(gen->pa_data.s); -+ pa_simple_free(gen->pa_data.s); - gen->pa_data.s = NULL; - } else { - cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, - "libcw_pa: called the function for NULL PA sink"); - } - -- if (cw_pa.handle) { -- dlclose(cw_pa.handle); -- } - - #if CW_DEV_RAW_SINK - if (gen->dev_raw_sink != -1) { --- -2.16.2 - diff --git a/pkgs/applications/misc/urh/default.nix b/pkgs/applications/misc/urh/default.nix deleted file mode 100644 index 8f490c971c71..000000000000 --- a/pkgs/applications/misc/urh/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ stdenv, fetchFromGitHub, python3Packages -, hackrf, rtl-sdr, airspy, limesuite }: - -python3Packages.buildPythonApplication rec { - name = "urh-${version}"; - version = "2.5.5"; - - src = fetchFromGitHub { - owner = "jopohl"; - repo = "urh"; - rev = "v${version}"; - sha256 = "14aw8bvqb32976qmm124i5sv99nwv1jvs1r9ylbsmlg31dvla7ql"; - }; - - buildInputs = [ hackrf rtl-sdr airspy limesuite ]; - propagatedBuildInputs = with python3Packages; [ - pyqt5 numpy psutil cython pyzmq - ]; - - doCheck = false; - - meta = with stdenv.lib; { - inherit (src.meta) homepage; - description = "Universal Radio Hacker: investigate wireless protocols like a boss"; - license = licenses.asl20; - platforms = platforms.linux; - maintainers = with maintainers; [ fpletz ]; - }; -} diff --git a/pkgs/applications/misc/welle-io/default.nix b/pkgs/applications/misc/welle-io/default.nix deleted file mode 100644 index fae591d7ee03..000000000000 --- a/pkgs/applications/misc/welle-io/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig -, qtbase, qtcharts, qtmultimedia, qtquickcontrols, qtquickcontrols2 -, faad2, rtl-sdr, soapysdr-with-plugins, libusb, fftwSinglePrec }: -let - - version = "1.0"; - -in stdenv.mkDerivation { - - name = "welle-io-${version}"; - - src = fetchFromGitHub { - owner = "AlbrechtL"; - repo = "welle.io"; - rev = "V${version}"; - sha256 = "1fsr0c2w16z45mcr85sqmllw1xf2gn6hp6f6fmgx2zfprq8gdmcr"; - }; - - nativeBuildInputs = [ cmake pkgconfig ]; - - buildInputs = [ - faad2 - fftwSinglePrec - libusb - qtbase - qtcharts - qtmultimedia - qtquickcontrols - qtquickcontrols2 - rtl-sdr - soapysdr-with-plugins - ]; - - cmakeFlags = [ - "-DRTLSDR=true" "-DSOAPYSDR=true" - ]; - - enableParallelBuilding = true; - - meta = with stdenv.lib; { - description = "A DAB/DAB+ Software Radio"; - homepage = https://www.welle.io/; - maintainers = with maintainers; [ ck3d ]; - license = licenses.gpl2; - platforms = with platforms; [ "x86_64-linux" "i686-linux" ] ++ darwin; - }; -} diff --git a/pkgs/applications/misc/wsjtx/default.nix b/pkgs/applications/misc/wsjtx/default.nix deleted file mode 100644 index 930515b93825..000000000000 --- a/pkgs/applications/misc/wsjtx/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, fetchurl, asciidoc, asciidoctor, autoconf, automake, cmake, - docbook_xsl, fftw, fftwFloat, gfortran, libtool, qtbase, - qtmultimedia, qtserialport, texinfo, libusb1 }: - -stdenv.mkDerivation rec { - name = "wsjtx-${version}"; - version = "2.0.0"; - - # This is a "superbuild" tarball containing both wsjtx and a hamlib fork - src = fetchurl { - url = "http://physics.princeton.edu/pulsar/k1jt/wsjtx-${version}.tgz"; - sha256 = "66434f69f256742da1fe057ec51e4464cab2614f0bfb1a310c04a385b77bd014"; - }; - - # Hamlib builds with autotools, wsjtx builds with cmake - # Omitting pkgconfig because it causes issues locating the built hamlib - nativeBuildInputs = [ - asciidoc asciidoctor autoconf automake cmake docbook_xsl gfortran libtool - texinfo - ]; - buildInputs = [ fftw fftwFloat libusb1 qtbase qtmultimedia qtserialport ]; - - # Remove Git dependency from superbuild since sources are included - patches = [ ./super.patch ]; - - # Superbuild has its own patch step after it extracts the inner archives - postPatch = "cp ${./wsjtx.patch} wsjtx.patch"; - - meta = with stdenv.lib; { - description = "Weak-signal digital communication modes for amateur radio"; - longDescription = '' - WSJT-X implements communication protocols or "modes" called FT8, JT4, JT9, - JT65, QRA64, ISCAT, MSK144, and WSPR, as well as one called Echo for - detecting and measuring your own radio signals reflected from the Moon. - These modes were all designed for making reliable, confirmed ham radio - contacts under extreme weak-signal conditions. - ''; - homepage = http://physics.princeton.edu/pulsar/k1jt/wsjtx.html; - # Older licenses are for the statically-linked hamlib - license = with licenses; [ gpl3Plus gpl2Plus lgpl21Plus ]; - platforms = platforms.linux; - maintainers = [ maintainers.lasandell ]; - }; -} diff --git a/pkgs/applications/misc/wsjtx/super.patch b/pkgs/applications/misc/wsjtx/super.patch deleted file mode 100644 index d903171ffc5a..000000000000 --- a/pkgs/applications/misc/wsjtx/super.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3bf97a4..2c9dce5 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23,7 +23,6 @@ source tarball." ) - # - # Find_library (USB_LIBRARY NAMES libusb.a usb) - Find_program (PATCH_EXECUTABLE patch REQUIRED) --Find_package (Git REQUIRED) - - # - # extra C flags to minimize hamlib excutable sizes diff --git a/pkgs/applications/misc/wsjtx/wsjtx.patch b/pkgs/applications/misc/wsjtx/wsjtx.patch deleted file mode 100644 index e92b420e58a4..000000000000 --- a/pkgs/applications/misc/wsjtx/wsjtx.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3e7e816b..e7dbb14a 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -860,6 +860,7 @@ find_package (Qt5Widgets 5 REQUIRED) - find_package (Qt5Multimedia 5 REQUIRED) - find_package (Qt5PrintSupport 5 REQUIRED) - find_package (Qt5Sql 5 REQUIRED) -+find_package (Qt5SerialPort 5 REQUIRED) - - if (WIN32) - add_definitions (-DQT_NEEDS_QTMAIN) diff --git a/pkgs/applications/misc/xlog/default.nix b/pkgs/applications/misc/xlog/default.nix deleted file mode 100644 index 7b9cf0a4ee55..000000000000 --- a/pkgs/applications/misc/xlog/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ stdenv, fetchurl, glib, gtk2, pkgconfig, hamlib }: -stdenv.mkDerivation rec { - pname = "xlog"; - version = "2.0.17"; - - src = fetchurl { - url = "https://download.savannah.gnu.org/releases/xlog/${pname}-${version}.tar.gz"; - sha256 = "0vmn8518zk7qk1mbp1h8dm0f8fx0z0jvmy42c1n15il714lj7vsl"; - }; - - buildInputs = [ glib pkgconfig gtk2 hamlib ]; - - meta = with stdenv.lib; { - description = "An amateur radio logging program"; - longDescription = - '' Xlog is an amateur radio logging program. - It supports cabrillo, ADIF, trlog (format also used by tlf), - and EDI (ARRL VHF/UHF contest format) and can import twlog, editest and OH1AA logbook files. - Xlog is able to do DXCC lookups and will display country information, CQ and ITU zone, - location in latitude and longitude and distance and heading in kilometers or miles, - both for short and long path. - ''; - homepage = https://www.nongnu.org/xlog; - maintainers = [ maintainers.mafo ]; - license = licenses.gpl3; - platforms = platforms.unix; - }; -} diff --git a/pkgs/applications/misc/xmrig/default.nix b/pkgs/applications/misc/xmrig/default.nix index c8ff2d479a06..cb2b682a952f 100644 --- a/pkgs/applications/misc/xmrig/default.nix +++ b/pkgs/applications/misc/xmrig/default.nix @@ -4,20 +4,22 @@ stdenv.mkDerivation rec { name = "xmrig-${version}"; - version = "2.10.0"; + version = "2.11.0"; src = fetchFromGitHub { owner = "xmrig"; repo = "xmrig"; rev = "v${version}"; - sha256 = "10nqwxj8j2ciw2h178g2z5lrzv48xsi2a4v6s0ha93hfbjzvag5a"; + sha256 = "0k897lx60gjf464j2ndindxhr6x3l90fv81bcqyglsv47danivlc"; }; nativeBuildInputs = [ cmake ]; buildInputs = [ libuv libmicrohttpd openssl ]; postPatch = '' - substituteInPlace src/donate.h --replace "kDonateLevel = 5;" "kDonateLevel = ${toString donateLevel};" + substituteInPlace src/donate.h \ + --replace "kDefaultDonateLevel = 5;" "kDefaultDonateLevel = ${toString donateLevel};" \ + --replace "kMinimumDonateLevel = 1;" "kMinimumDonateLevel = ${toString donateLevel};" ''; installPhase = '' diff --git a/pkgs/applications/misc/xmrig/proxy.nix b/pkgs/applications/misc/xmrig/proxy.nix index c013a9cc44ec..2df0cdafdc4b 100644 --- a/pkgs/applications/misc/xmrig/proxy.nix +++ b/pkgs/applications/misc/xmrig/proxy.nix @@ -1,24 +1,28 @@ -{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, libuuid +{ stdenv, lib, fetchFromGitHub, cmake, libuv, libmicrohttpd, libuuid, openssl , donateLevel ? 0 }: stdenv.mkDerivation rec { name = "xmrig-proxy-${version}"; - version = "2.6.4"; + version = "2.11.0"; src = fetchFromGitHub { owner = "xmrig"; repo = "xmrig-proxy"; rev = "v${version}"; - sha256 = "0h6ihrrkgwi8k642iqq13qx3zlxl9r8q7wm417hb7j35rnmwn8lq"; + sha256 = "1jjcgnpkxdafsdsxndsvzd84i6mwk7ix4vvgs3k1dla9ll9nwq5j"; }; nativeBuildInputs = [ cmake ]; - buildInputs = [ libuv libmicrohttpd libuuid ]; + buildInputs = [ libuv libmicrohttpd libuuid openssl ]; - # Set default donation level to 0%. Can be increased at runtime via --donate-level option. postPatch = '' - substituteInPlace src/donate.h --replace "kDonateLevel = 2;" "kDonateLevel = ${toString donateLevel};" + # Set default donation level to 0%. Can be increased at runtime via --donate-level option. + substituteInPlace src/donate.h \ + --replace "kDefaultDonateLevel = 2;" "kDefaultDonateLevel = ${toString donateLevel};" + + # Link dynamically against libuuid instead of statically + substituteInPlace CMakeLists.txt --replace uuid.a uuid ''; installPhase = '' |