From 8ec6bcf95582edbff025ec63ede38906e81c9937 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Thu, 25 May 2017 22:15:15 -0500 Subject: [PATCH 01/24] UHD: enable Darwin build --- pkgs/development/tools/misc/uhd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/tools/misc/uhd/default.nix b/pkgs/development/tools/misc/uhd/default.nix index 889595ab743a1..8212eccc6d138 100644 --- a/pkgs/development/tools/misc/uhd/default.nix +++ b/pkgs/development/tools/misc/uhd/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { ''; homepage = https://uhd.ettus.com/; license = licenses.gpl3Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ bjornfor fpletz ]; }; } From c3cfa106af7def2d5420b91978c47c4421051ac0 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:00:02 -0500 Subject: [PATCH 02/24] qwt6_qt4: 6.1.2 -> 6.1.3 --- pkgs/development/libraries/qwt/6_qt4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/qwt/6_qt4.nix b/pkgs/development/libraries/qwt/6_qt4.nix index 0315ae72709ee..84b71ef4dd79e 100644 --- a/pkgs/development/libraries/qwt/6_qt4.nix +++ b/pkgs/development/libraries/qwt/6_qt4.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, qt4, qmake4Hook }: stdenv.mkDerivation rec { - name = "qwt-6.1.2"; + name = "qwt-6.1.3"; src = fetchurl { url = "mirror://sourceforge/qwt/${name}.tar.bz2"; - sha256 = "031x4hz1jpbirv9k35rqb52bb9mf2w7qav89qv1yfw1r3n6z221b"; + sha256 = "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"; }; buildInputs = [ qt4 ]; From f90ddc99f6baf59a5dabb11cfd572806ad1274b1 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:10:38 -0500 Subject: [PATCH 03/24] qwt6_qt4: Fix darwin build by adding AGL input --- pkgs/development/libraries/qwt/6_qt4.nix | 7 +++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/qwt/6_qt4.nix b/pkgs/development/libraries/qwt/6_qt4.nix index 84b71ef4dd79e..6f722c5992098 100644 --- a/pkgs/development/libraries/qwt/6_qt4.nix +++ b/pkgs/development/libraries/qwt/6_qt4.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, qt4, qmake4Hook }: +{ stdenv, fetchurl, qt4, qmake4Hook, AGL }: stdenv.mkDerivation rec { name = "qwt-6.1.3"; @@ -8,7 +8,10 @@ stdenv.mkDerivation rec { sha256 = "0cwp63s03dw351xavb3pzbjlqvx7kj88wv7v4a2b18m9f97d7v7k"; }; - buildInputs = [ qt4 ]; + buildInputs = [ + qt4 + ] ++ stdenv.lib.optionals stdenv.isDarwin [ AGL ]; + nativeBuildInputs = [ qmake4Hook ]; postPatch = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 793f3889c7ffd..53b0e1b135c74 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10507,7 +10507,9 @@ with pkgs; qwt = callPackage ../development/libraries/qwt {}; - qwt6_qt4 = callPackage ../development/libraries/qwt/6_qt4.nix { }; + qwt6_qt4 = callPackage ../development/libraries/qwt/6_qt4.nix { + inherit (darwin.apple_sdk.frameworks) AGL; + }; qxt = callPackage ../development/libraries/qxt {}; From 97c5cf0bf24f868b6603f343d501fc9e880e4e48 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:58:08 -0500 Subject: [PATCH 04/24] qwt6_qt4: preFixup: Repair relative reference in darwin framework output --- pkgs/development/libraries/qwt/6_qt4.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/libraries/qwt/6_qt4.nix b/pkgs/development/libraries/qwt/6_qt4.nix index 6f722c5992098..7c037db0aed2d 100644 --- a/pkgs/development/libraries/qwt/6_qt4.nix +++ b/pkgs/development/libraries/qwt/6_qt4.nix @@ -18,6 +18,13 @@ stdenv.mkDerivation rec { sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri ''; + # qwt.framework output includes a relative reference to itself, which breaks dependents + preFixup = + stdenv.lib.optionalString stdenv.isDarwin '' + echo "Attempting to repair qwt" + install_name_tool -id "$out/lib/qwt.framework/Versions/6/qwt" "$out/lib/qwt.framework/Versions/6/qwt" + ''; + qmakeFlags = [ "-after doc.path=$out/share/doc/${name}" ]; meta = with stdenv.lib; { From de51e4a35b091c43e3c08efc79ae8e9f809e47ba Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:12:13 -0500 Subject: [PATCH 05/24] qwt6_qt4: enableParallelBuilding --- pkgs/development/libraries/qwt/6_qt4.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/qwt/6_qt4.nix b/pkgs/development/libraries/qwt/6_qt4.nix index 7c037db0aed2d..79b182b33b224 100644 --- a/pkgs/development/libraries/qwt/6_qt4.nix +++ b/pkgs/development/libraries/qwt/6_qt4.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ qmake4Hook ]; + enableParallelBuilding = true; + postPatch = '' sed -e "s|QWT_INSTALL_PREFIX.*=.*|QWT_INSTALL_PREFIX = $out|g" -i qwtconfig.pri ''; From b32e8ce7d7ad3b9452e45fa09c6011cd028442ed Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Wed, 12 Jul 2017 12:14:07 -0500 Subject: [PATCH 06/24] libosmocore: 0.9.0 -> 0.9.6 add new required talloc, python2 inputs; enableParallelBuilding --- .../applications/misc/libosmocore/default.nix | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/misc/libosmocore/default.nix b/pkgs/applications/misc/libosmocore/default.nix index 47bcbb6fce915..17a13d7c49c4c 100644 --- a/pkgs/applications/misc/libosmocore/default.nix +++ b/pkgs/applications/misc/libosmocore/default.nix @@ -1,25 +1,31 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pcsclite, pkgconfig +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, pcsclite, talloc, python2 }: stdenv.mkDerivation rec { name = "libosmocore-${version}"; - version = "0.9.0"; + version = "0.9.6"; src = fetchFromGitHub { owner = "osmocom"; repo = "libosmocore"; - rev = "8649d57f507d359c99a89654aac7e19ce22db282"; - sha256 = "08mcpy9ljwb1i3l4cmlwn024q2psk5gg9f0ylgh99hy1ffx0n7am"; + rev = "3cc757df1822114bf446dc2d5f6a95da92321a25"; + sha256 = "0dk7065qcy2kjra0p8q2124p73jcyvvzz3cmhid1kx5scyxmr017"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + propagatedBuildInputs = [ + talloc + ]; + + nativeBuildInputs = [ + autoreconfHook pkgconfig + ]; + buildInputs = [ - pcsclite + pcsclite python2 ]; - preConfigure = '' - autoreconf -i -f - ''; + enableParallelBuilding = true; meta = with stdenv.lib; { description = "libosmocore"; From 9be55b0d04f4bcab9d7522f98faebfe373c83b77 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:27:47 -0500 Subject: [PATCH 07/24] libosmocore: enable Darwin building --- pkgs/applications/misc/libosmocore/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/libosmocore/default.nix b/pkgs/applications/misc/libosmocore/default.nix index 17a13d7c49c4c..4f1745c0d8ced 100644 --- a/pkgs/applications/misc/libosmocore/default.nix +++ b/pkgs/applications/misc/libosmocore/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { description = "libosmocore"; homepage = https://github.com/osmocom/libosmocore; license = licenses.gpl2Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ mog ]; }; } From 4bc189db28e70251b94d1823a31787a26d6f44d2 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Tue, 18 Jul 2017 17:30:38 -0500 Subject: [PATCH 08/24] urh: platforms to linux only due to qt5 issue on Darwin --- pkgs/applications/misc/urh/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/urh/default.nix b/pkgs/applications/misc/urh/default.nix index faf373092d571..78305675f17f6 100644 --- a/pkgs/applications/misc/urh/default.nix +++ b/pkgs/applications/misc/urh/default.nix @@ -22,7 +22,7 @@ python3Packages.buildPythonApplication rec { inherit (src.meta) homepage; description = "Universal Radio Hacker: investigate wireless protocols like a boss"; license = licenses.asl20; - platforms = platforms.all; + platforms = platforms.linux; maintainers = with maintainers; [ fpletz ]; }; } From 60d95cc41a77381ca6513b00ddfa61e9f5327c46 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:24:15 -0500 Subject: [PATCH 09/24] rtl-sdr: enable Darwin building; postInstall: only run on Linux --- pkgs/applications/misc/rtl-sdr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/rtl-sdr/default.nix b/pkgs/applications/misc/rtl-sdr/default.nix index 652dd9d5e6506..f1c3cbc555776 100644 --- a/pkgs/applications/misc/rtl-sdr/default.nix +++ b/pkgs/applications/misc/rtl-sdr/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { # /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 = '' + 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" @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { 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 = platforms.linux ++ platforms.darwin; maintainers = [ maintainers.bjornfor ]; }; } From ba49dfb318dd892677788b9850a2717cdbf8e215 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:22:07 -0500 Subject: [PATCH 10/24] gnuradio: document purpose of package inputs --- pkgs/applications/misc/gnuradio/default.nix | 28 +++++++++++---------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 0156122ec79a5..338763d980e20 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -1,24 +1,26 @@ -{ stdenv, fetchurl -# core dependencies +{ stdenv, fetchurl, makeWrapper +# Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html +# => core dependencies , cmake, pkgconfig, git, boost, cppunit, fftw -# python wrappers +# => python wrappers +# May be able to upgrade to swig3 , python, swig2, numpy, scipy, matplotlib -# grc - the gnu radio companion +# => grc - the gnu radio companion , cheetah, pygtk -# gr-wavelet: collection of wavelet blocks +# => gr-wavelet: collection of wavelet blocks , gsl -# gr-qtgui: the Qt-based GUI -, qt4, qwt, pyqt4 #, pyqwt -# gr-wxgui: the Wx-based GUI +# => 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 -# uhd: the Ettus USRP Hardware Driver Interface +# => gr-audio: audio subsystems (system/OS dependent) +, alsaLib # linux 'audio-alsa' +# => uhd: the Ettus USRP Hardware Driver Interface , uhd -# gr-video-sdl: PAL and NTSC display +# => gr-video-sdl: PAL and NTSC display , SDL +# Other , libusb1, orc, pyopengl -, makeWrapper }: stdenv.mkDerivation rec { From b9c426c5a6748a5b6a994c7680c31f1f124839a7 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:24:07 -0500 Subject: [PATCH 11/24] gnuradio: use qwt6_qt4 instead of qwt5 --- pkgs/applications/misc/gnuradio/default.nix | 4 ++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 insertions(+) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 338763d980e20..71b61391535ac 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -54,6 +54,10 @@ stdenv.mkDerivation rec { export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -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. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 53b0e1b135c74..4cc99bd65d9ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14649,6 +14649,7 @@ with pkgs; gnuradio = callPackage ../applications/misc/gnuradio { inherit (python2Packages) cheetah lxml matplotlib numpy python pyopengl pyqt4 scipy wxPython pygtk; fftw = fftwFloat; + qwt = qwt6_qt4; }; gnuradio-with-packages = callPackage ../applications/misc/gnuradio/wrapper.nix { From 861773bfa54eec48a8ccde33697e5cafb280b769 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:27:09 -0500 Subject: [PATCH 12/24] gnuradio: reorder build inputs --- pkgs/applications/misc/gnuradio/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 71b61391535ac..9c29aec05ca94 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -32,12 +32,14 @@ stdenv.mkDerivation rec { sha256 = "1m2jf8lafr6pr2dlm40nbvr6az8gwjfkzpbs4fxzv3l5hcqvmnc7"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ - cmake git boost cppunit fftw python swig2 orc lxml qt4 - qwt alsaLib SDL libusb1 uhd gsl makeWrapper + 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 ]; propagatedBuildInputs = [ cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl ]; From e81d84fcea26ab288b4eb5b0d477d2c8112e9762 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:29:38 -0500 Subject: [PATCH 13/24] gnuradio: add CoreAudio input for Darwin --- pkgs/applications/misc/gnuradio/default.nix | 5 ++++- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 9c29aec05ca94..3f8c5295111ac 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -15,6 +15,7 @@ , 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 @@ -39,7 +40,9 @@ stdenv.mkDerivation rec { buildInputs = [ boost fftw python swig2 lxml qt4 qwt SDL libusb1 uhd gsl - ] ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib ]; + ] ++ stdenv.lib.optionals stdenv.isLinux [ alsaLib ] + ++ stdenv.lib.optionals stdenv.isDarwin [ CoreAudio ]; + propagatedBuildInputs = [ cheetah numpy scipy matplotlib pyqt4 pygtk wxPython pyopengl ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4cc99bd65d9ec..311bd4c5fe948 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14648,6 +14648,7 @@ with pkgs; gnuradio = callPackage ../applications/misc/gnuradio { inherit (python2Packages) cheetah lxml matplotlib numpy python pyopengl pyqt4 scipy wxPython pygtk; + inherit (darwin.apple_sdk.frameworks) CoreAudio; fftw = fftwFloat; qwt = qwt6_qt4; }; From 3cdf4308b25e717f4fbad1b329c44836ef5a982b Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:31:53 -0500 Subject: [PATCH 14/24] gnuradio: wrapProgram: set DYLD_FRAMEWORK_PATH This prevents CoreFoundation-related crashes --- pkgs/applications/misc/gnuradio/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 3f8c5295111ac..2552fc1a87010 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -74,7 +74,8 @@ stdenv.mkDerivation rec { 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" + --set MATPLOTLIBRC "$out/share/gnuradio" \ + ${stdenv.lib.optionalString stdenv.isDarwin "--set DYLD_FRAMEWORK_PATH /System/Library/Frameworks"} done ''; From 482d8de3b00f548d2b9a38e95c8c19e7d0b65263 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:33:28 -0500 Subject: [PATCH 15/24] gnuradio: postInstall: PYTHONPATH / DYLD_FRAMEWORK_PATH notes --- pkgs/applications/misc/gnuradio/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 2552fc1a87010..29409a2e6f244 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -68,6 +68,11 @@ stdenv.mkDerivation rec { # *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" From 17908a7de1720aa870494c8a5a8483a6b065b8a7 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:34:29 -0500 Subject: [PATCH 16/24] gnuradio: setupHook: enable composition with nix-shell --- pkgs/applications/misc/gnuradio/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 29409a2e6f244..41466fa6fc022 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper +{ stdenv, fetchurl, writeText, makeWrapper # Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html # => core dependencies , cmake, pkgconfig, git, boost, cppunit, fftw @@ -55,6 +55,16 @@ stdenv.mkDerivation rec { --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 + } + envHooks+=(addGRCBlocksPath) + ''; + + setupHook = [ grcSetupHook ]; + preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11" ''; From 6e9140d5c344078f0cfc1c10a9de4aab705bd7ed Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Tue, 25 Jul 2017 18:08:33 -0500 Subject: [PATCH 17/24] gnuradio: force wxgui and pygtk check to true enables gnuradio-companion compilation in headless/nix-multiuser environment --- pkgs/applications/misc/gnuradio/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 41466fa6fc022..058c8a8d94510 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -65,8 +65,11 @@ stdenv.mkDerivation rec { setupHook = [ grcSetupHook ]; + # patch wxgui and pygtk check due to python importerror in a headless environment preConfigure = '' export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -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 ''; # Framework path needed for qwt6_qt4 but not qwt5 From 5d75dbe5e597e14327247fb5a59ba4859e06c9fa Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 10 Nov 2017 18:26:09 -0600 Subject: [PATCH 18/24] gnuradio: Resolve darwin c++11 issues -std=c++11 causes errors with OBJ-C files on Darwin. Inject dynamic compiler flag into every cmake file to work around this. --- pkgs/applications/misc/gnuradio/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 058c8a8d94510..ec6346781d9b8 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -67,9 +67,10 @@ stdenv.mkDerivation rec { # patch wxgui and pygtk check due to python importerror in a headless environment preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -Wno-unused-variable -std=c++11" + 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($<$:-std=c++11>)' "{}" ";" ''; # Framework path needed for qwt6_qt4 but not qwt5 From 1b1c82f4f43934ab41240086c3c86d85e97f4282 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 10 Nov 2017 18:24:05 -0600 Subject: [PATCH 19/24] gnuradio: 3.7.11.0 -> 3.7.11.1 this version includes GCC6 improvements --- pkgs/applications/misc/gnuradio/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index ec6346781d9b8..8039929120b8d 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, writeText, makeWrapper +{ stdenv, fetchFromGitHub, writeText, makeWrapper # Dependencies documented @ https://gnuradio.org/doc/doxygen/build_guide.html # => core dependencies , cmake, pkgconfig, git, boost, cppunit, fftw @@ -26,11 +26,14 @@ stdenv.mkDerivation rec { name = "gnuradio-${version}"; - version = "3.7.11"; + version = "3.7.11.1"; - src = fetchurl { - url = "https://gnuradio.org/releases/gnuradio/${name}.tar.gz"; - sha256 = "1m2jf8lafr6pr2dlm40nbvr6az8gwjfkzpbs4fxzv3l5hcqvmnc7"; + src = fetchFromGitHub { + owner = "gnuradio"; + repo = "gnuradio"; + rev = "6d2221196082a4954c249dc6955e33d5832a56f2"; + sha256 = "1fkrb8cnjbriy2x94lz73q6aqxar1rkvfbafp266ykdpm29b4xgm"; + fetchSubmodules = true; }; nativeBuildInputs = [ From 86d953ee39cf927a1a638974e3f0256891dc86a4 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 18:30:20 -0500 Subject: [PATCH 20/24] gnuradio: enable Darwin building --- pkgs/applications/misc/gnuradio/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio/default.nix b/pkgs/applications/misc/gnuradio/default.nix index 8039929120b8d..470e046e85e57 100644 --- a/pkgs/applications/misc/gnuradio/default.nix +++ b/pkgs/applications/misc/gnuradio/default.nix @@ -114,7 +114,7 @@ stdenv.mkDerivation rec { ''; homepage = https://www.gnuradio.org; license = licenses.gpl3; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ bjornfor fpletz ]; }; } From d8d9697402fcfaef0cca896b5256a9980d39a9b6 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:01:49 -0500 Subject: [PATCH 21/24] gnuradio-ais: Fix Volk library search issue. Fix incorrect version date. - Issue fixed in my PR (bistromath/gr-ais@8502d02) - The commit date of the original src is "2015-12-20" not "2016-08-26" (version hasn't changed) --- pkgs/applications/misc/gnuradio-ais/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/gnuradio-ais/default.nix b/pkgs/applications/misc/gnuradio-ais/default.nix index a67a8a44fcedb..07ca480cd2e5c 100644 --- a/pkgs/applications/misc/gnuradio-ais/default.nix +++ b/pkgs/applications/misc/gnuradio-ais/default.nix @@ -7,13 +7,14 @@ assert pythonSupport -> python != null && swig != null; stdenv.mkDerivation rec { name = "gnuradio-ais-${version}"; - version = "2016-08-26"; + version = "2015-12-20"; src = fetchFromGitHub { owner = "bistromath"; repo = "gr-ais"; - rev = "1863d1bf8a7709a8dfedb3ddb8e2b99112e7c872"; - sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6"; + # Upstream PR: https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054 + "rev" = "8502d0252a2a1a9b8d1a71795eaeb5d820684054"; + "sha256" = "1b9j0kc74cw12a7jv4lii77dgzqzg2s8ndzp4xmisxksgva1qfvh"; }; nativeBuildInputs = [ pkgconfig ]; From b1c666ef6c3bd098b270ea59c0ecdffe2885c051 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:26:42 -0500 Subject: [PATCH 22/24] gnuradio-{ais,gsm,nacl,osmosdr,rds}: enable Darwin building --- pkgs/applications/misc/gnuradio-ais/default.nix | 2 +- pkgs/applications/misc/gnuradio-gsm/default.nix | 2 +- pkgs/applications/misc/gnuradio-nacl/default.nix | 2 +- pkgs/applications/misc/gnuradio-osmosdr/default.nix | 2 +- pkgs/applications/misc/gnuradio-rds/default.nix | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/gnuradio-ais/default.nix b/pkgs/applications/misc/gnuradio-ais/default.nix index 07ca480cd2e5c..ab2ef3852014a 100644 --- a/pkgs/applications/misc/gnuradio-ais/default.nix +++ b/pkgs/applications/misc/gnuradio-ais/default.nix @@ -32,7 +32,7 @@ stdenv.mkDerivation rec { description = "Gnuradio block for ais"; homepage = https://github.com/bistromath/gr-ais; license = licenses.gpl3Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ mog ]; }; } diff --git a/pkgs/applications/misc/gnuradio-gsm/default.nix b/pkgs/applications/misc/gnuradio-gsm/default.nix index bbdc74510eaa8..5277b23e788bc 100644 --- a/pkgs/applications/misc/gnuradio-gsm/default.nix +++ b/pkgs/applications/misc/gnuradio-gsm/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { description = "Gnuradio block for gsm"; homepage = https://github.com/ptrkrysik/gr-gsm; license = licenses.gpl3Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ mog ]; }; } diff --git a/pkgs/applications/misc/gnuradio-nacl/default.nix b/pkgs/applications/misc/gnuradio-nacl/default.nix index cd3630c842c30..cc7c71a448315 100644 --- a/pkgs/applications/misc/gnuradio-nacl/default.nix +++ b/pkgs/applications/misc/gnuradio-nacl/default.nix @@ -31,7 +31,7 @@ stdenv.mkDerivation rec { description = "Gnuradio block for encryption"; homepage = https://github.com/stwunsch/gr-nacl; license = licenses.gpl3Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ mog ]; }; } diff --git a/pkgs/applications/misc/gnuradio-osmosdr/default.nix b/pkgs/applications/misc/gnuradio-osmosdr/default.nix index e2d3e808476e7..e855bb8a67127 100644 --- a/pkgs/applications/misc/gnuradio-osmosdr/default.nix +++ b/pkgs/applications/misc/gnuradio-osmosdr/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { description = "Gnuradio block for OsmoSDR and rtl-sdr"; homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR; license = licenses.gpl3Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ bjornfor the-kenny ]; }; } diff --git a/pkgs/applications/misc/gnuradio-rds/default.nix b/pkgs/applications/misc/gnuradio-rds/default.nix index 3d09441a7f035..7f2b33b04c35c 100644 --- a/pkgs/applications/misc/gnuradio-rds/default.nix +++ b/pkgs/applications/misc/gnuradio-rds/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { description = "Gnuradio block for radio data system"; homepage = https://github.com/bastibl/gr-rds; license = licenses.gpl2Plus; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ mog ]; }; } From 03193f542edf1edacf690affe434511a42b89b98 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:27:30 -0500 Subject: [PATCH 23/24] gnuradio-{ais,gsm,nacl,osmosdr,rds}: enableParallelBuilding --- pkgs/applications/misc/gnuradio-ais/default.nix | 2 ++ pkgs/applications/misc/gnuradio-gsm/default.nix | 2 ++ pkgs/applications/misc/gnuradio-nacl/default.nix | 2 ++ pkgs/applications/misc/gnuradio-osmosdr/default.nix | 2 ++ pkgs/applications/misc/gnuradio-rds/default.nix | 2 ++ 5 files changed, 10 insertions(+) diff --git a/pkgs/applications/misc/gnuradio-ais/default.nix b/pkgs/applications/misc/gnuradio-ais/default.nix index ab2ef3852014a..dfb8415219c71 100644 --- a/pkgs/applications/misc/gnuradio-ais/default.nix +++ b/pkgs/applications/misc/gnuradio-ais/default.nix @@ -28,6 +28,8 @@ stdenv.mkDerivation rec { done ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Gnuradio block for ais"; homepage = https://github.com/bistromath/gr-ais; diff --git a/pkgs/applications/misc/gnuradio-gsm/default.nix b/pkgs/applications/misc/gnuradio-gsm/default.nix index 5277b23e788bc..6e0856ce66aa8 100644 --- a/pkgs/applications/misc/gnuradio-gsm/default.nix +++ b/pkgs/applications/misc/gnuradio-gsm/default.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { done ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Gnuradio block for gsm"; homepage = https://github.com/ptrkrysik/gr-gsm; diff --git a/pkgs/applications/misc/gnuradio-nacl/default.nix b/pkgs/applications/misc/gnuradio-nacl/default.nix index cc7c71a448315..28836958e98c0 100644 --- a/pkgs/applications/misc/gnuradio-nacl/default.nix +++ b/pkgs/applications/misc/gnuradio-nacl/default.nix @@ -27,6 +27,8 @@ stdenv.mkDerivation rec { done ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Gnuradio block for encryption"; homepage = https://github.com/stwunsch/gr-nacl; diff --git a/pkgs/applications/misc/gnuradio-osmosdr/default.nix b/pkgs/applications/misc/gnuradio-osmosdr/default.nix index e855bb8a67127..8c2cb7c733149 100644 --- a/pkgs/applications/misc/gnuradio-osmosdr/default.nix +++ b/pkgs/applications/misc/gnuradio-osmosdr/default.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { done ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Gnuradio block for OsmoSDR and rtl-sdr"; homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR; diff --git a/pkgs/applications/misc/gnuradio-rds/default.nix b/pkgs/applications/misc/gnuradio-rds/default.nix index 7f2b33b04c35c..44ed89d9002dd 100644 --- a/pkgs/applications/misc/gnuradio-rds/default.nix +++ b/pkgs/applications/misc/gnuradio-rds/default.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { done ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Gnuradio block for radio data system"; homepage = https://github.com/bastibl/gr-rds; From 367e5f726f0540601ab2acdc491b47ca161533e9 Mon Sep 17 00:00:00 2001 From: Luke Adams Date: Fri, 14 Jul 2017 19:28:13 -0500 Subject: [PATCH 24/24] gnuradio-osmosdr: update homepage --- pkgs/applications/misc/gnuradio-osmosdr/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/gnuradio-osmosdr/default.nix b/pkgs/applications/misc/gnuradio-osmosdr/default.nix index 8c2cb7c733149..2fd64d02f18bc 100644 --- a/pkgs/applications/misc/gnuradio-osmosdr/default.nix +++ b/pkgs/applications/misc/gnuradio-osmosdr/default.nix @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Gnuradio block for OsmoSDR and rtl-sdr"; - homepage = http://sdr.osmocom.org/trac/wiki/GrOsmoSDR; + homepage = https://sdr.osmocom.org/trac/wiki/GrOsmoSDR; license = licenses.gpl3Plus; platforms = platforms.linux ++ platforms.darwin; maintainers = with maintainers; [ bjornfor the-kenny ];