forked from mirrors/nixpkgs
Merge pull request #106599 from doronbehar/pkg/gnuradio/pkgs
This commit is contained in:
commit
5e367ecef9
|
@ -36,7 +36,17 @@
|
|||
now point to an externally wrapped by default derivations, that allow you to
|
||||
also add `extraPythonPackages` to the Python interpreter used by GNURadio.
|
||||
Missing environmental variables needed for operational GUI were also added
|
||||
(<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#7547</link>).
|
||||
(<link xlink:href="https://github.com/NixOS/nixpkgs/issues/75478">#75478</link>).
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
<link xlink:href="https://www.gnuradio.org/">GNURadio</link> has a
|
||||
<code>pkgs</code> attribute set, and there's a <code>gnuradio.callPackage</code>
|
||||
function that extends <code>pkgs</code> with a <code>mkDerivation</code>, and a
|
||||
<code>mkDerivationWith</code>, like Qt5. Now all <code>gnuradio.pkgs</code> are
|
||||
defined with <code>gnuradio.callPackage</code> and some packages that depend
|
||||
on gnuradio are defined with this as well.
|
||||
</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, armadillo
|
||||
, boost
|
||||
, cmake
|
||||
, gmp
|
||||
, glog
|
||||
, gmock
|
||||
, openssl
|
||||
, gflags
|
||||
, gnuradio
|
||||
, gnuradio3_8
|
||||
, libpcap
|
||||
, orc
|
||||
, pkg-config
|
||||
, pythonPackages
|
||||
, uhd
|
||||
, log4cpp
|
||||
, blas, lapack
|
||||
|
@ -18,7 +19,7 @@
|
|||
, protobuf
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
gnuradio3_8.pkgs.mkDerivation rec {
|
||||
pname = "gnss-sdr";
|
||||
version = "0.0.13";
|
||||
|
||||
|
@ -29,27 +30,32 @@ stdenv.mkDerivation rec {
|
|||
sha256 = "0a3k47fl5dizzhbqbrbmckl636lznyjby2d2nz6fz21637hvrnby";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
gnuradio3_8.unwrapped.python
|
||||
gnuradio3_8.unwrapped.python.pkgs.Mako
|
||||
gnuradio3_8.unwrapped.python.pkgs.six
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gmp
|
||||
armadillo
|
||||
boost.dev
|
||||
gnuradio3_8.unwrapped.boost
|
||||
glog
|
||||
gmock
|
||||
openssl.dev
|
||||
openssl
|
||||
gflags
|
||||
gnuradio
|
||||
orc
|
||||
pythonPackages.Mako
|
||||
pythonPackages.six
|
||||
|
||||
# UHD support is optional, but gnuradio is built with it, so there's
|
||||
# nothing to be gained by leaving it out.
|
||||
uhd
|
||||
gnuradio3_8.unwrapped.uhd
|
||||
log4cpp
|
||||
blas lapack
|
||||
matio
|
||||
pugixml
|
||||
protobuf
|
||||
gnuradio3_8.pkgs.osmosdr
|
||||
libpcap
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, swig
|
||||
, orc
|
||||
|
@ -43,11 +44,12 @@
|
|||
minor = "14";
|
||||
patch = "0";
|
||||
}
|
||||
, fetchSubmodules ? true
|
||||
# We use our build of volk and not the one bundled with the release
|
||||
, fetchSubmodules ? false
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "1nh4f9dmygprlbqybd3j1byg9fsr6065n140mvc4b0v8qqygmhrc";
|
||||
sourceSha256 = "BiUDibXV/5cEYmAAaIxT4WTxF/ni4MJumF5oJ/vuOyc=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
|
@ -61,6 +63,9 @@ let
|
|||
};
|
||||
volk = {
|
||||
cmakeEnableFlag = "VOLK";
|
||||
runtime = [
|
||||
volk
|
||||
];
|
||||
};
|
||||
doxygen = {
|
||||
native = [ doxygen ];
|
||||
|
@ -213,19 +218,29 @@ let
|
|||
qt = qt4;
|
||||
gtk = gtk2;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
hasFeature # function
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
disallowedReferences
|
||||
postInstall
|
||||
passthru
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
meta
|
||||
;
|
||||
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit boost volk;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
|
||||
inherit uhd;
|
||||
};
|
||||
cmakeFlags = shared.cmakeFlags
|
||||
# From some reason, if these are not set, libcodec2 and gsm are
|
||||
# not detected properly (slightly different then what's in
|
||||
|
@ -236,6 +251,9 @@ let
|
|||
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
|
||||
"-DLIBGSM_INCLUDE_DIR=${gsm}/include/gsm"
|
||||
]
|
||||
++ lib.optionals (hasFeature "volk" features && volk != null) [
|
||||
"-DENABLE_INTERNAL_VOLK=OFF"
|
||||
]
|
||||
;
|
||||
stripDebugList = shared.stripDebugList
|
||||
# gr-fcd feature was dropped in 3.8
|
||||
|
@ -250,15 +268,6 @@ let
|
|||
+ lib.optionalString (hasFeature "gnuradio-companion" features) ''
|
||||
sed -i 's/.*pygtk_version.*/set(PYGTK_FOUND TRUE)/g' grc/CMakeLists.txt
|
||||
''
|
||||
# If python-support is disabled, don't install volk's (git submodule)
|
||||
# volk_modtool - it references python.
|
||||
#
|
||||
# NOTE: The same is done for 3.8, but we don't put this string in
|
||||
# ./shared.nix since on the next release of 3.8 it won't be needed there,
|
||||
# but it will be needed for 3.7, probably for ever.
|
||||
+ lib.optionalString (!hasFeature "python-support" features) ''
|
||||
sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
|
||||
''
|
||||
;
|
||||
patches = [
|
||||
# Don't install python referencing files if python support is disabled.
|
||||
|
@ -272,24 +281,4 @@ let
|
|||
sha256 = "2Pitgu8accs16B5X5+/q51hr+IY9DMsA15f56gAtBs8=";
|
||||
})
|
||||
];
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit
|
||||
pname
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
cmakeFlags
|
||||
preConfigure
|
||||
# disallowedReferences
|
||||
stripDebugList
|
||||
patches
|
||||
postInstall
|
||||
passthru
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
meta
|
||||
;
|
||||
}
|
||||
|
|
284
pkgs/applications/radio/gnuradio/3.8.nix
Normal file
284
pkgs/applications/radio/gnuradio/3.8.nix
Normal file
|
@ -0,0 +1,284 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, swig
|
||||
, orc
|
||||
, boost
|
||||
, log4cpp
|
||||
, mpir
|
||||
, doxygen
|
||||
, python
|
||||
, codec2
|
||||
, gsm
|
||||
, fftwFloat
|
||||
, alsaLib
|
||||
, libjack2
|
||||
, CoreAudio
|
||||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, cppzmq
|
||||
, zeromq
|
||||
# Needed only if qt-gui is disabled, from some reason
|
||||
, icu
|
||||
# GUI related
|
||||
, gtk3
|
||||
, pango
|
||||
, gobject-introspection
|
||||
, cairo
|
||||
, qt5
|
||||
, libsForQt5
|
||||
# Features available to override, the list of them is in featuresInfo. They
|
||||
# are all turned on by default.
|
||||
, features ? {}
|
||||
# If one wishes to use a different src or name for a very custom build
|
||||
, overrideSrc ? {}
|
||||
, pname ? "gnuradio"
|
||||
, versionAttr ? {
|
||||
major = "3.8";
|
||||
minor = "2";
|
||||
patch = "0";
|
||||
}
|
||||
# We use our build of volk and not the one bundled with the release
|
||||
, fetchSubmodules ? false
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "SFDjtyQRp0fXijZukpLYtISpx8imxedlYN9mRibv1eA=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
native = [
|
||||
cmake
|
||||
pkg-config
|
||||
orc
|
||||
];
|
||||
runtime = [
|
||||
boost
|
||||
log4cpp
|
||||
mpir
|
||||
]
|
||||
# when gr-qtgui is disabled, icu needs to be included, otherwise
|
||||
# building with boost 1.7x fails
|
||||
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
|
||||
pythonNative = with python.pkgs; [
|
||||
Mako
|
||||
six
|
||||
];
|
||||
};
|
||||
volk = {
|
||||
cmakeEnableFlag = "VOLK";
|
||||
runtime = [
|
||||
volk
|
||||
];
|
||||
};
|
||||
doxygen = {
|
||||
native = [ doxygen ];
|
||||
cmakeEnableFlag = "DOXYGEN";
|
||||
};
|
||||
sphinx = {
|
||||
pythonNative = with python.pkgs; [ sphinx ];
|
||||
cmakeEnableFlag = "SPHINX";
|
||||
};
|
||||
python-support = {
|
||||
pythonRuntime = [ python.pkgs.six ];
|
||||
native = [
|
||||
swig
|
||||
python
|
||||
];
|
||||
cmakeEnableFlag = "PYTHON";
|
||||
};
|
||||
testing-support = {
|
||||
native = [ cppunit ];
|
||||
cmakeEnableFlag = "TESTING";
|
||||
};
|
||||
gnuradio-runtime = {
|
||||
cmakeEnableFlag = "GNURADIO_RUNTIME";
|
||||
};
|
||||
gr-ctrlport = {
|
||||
# Thrift support is not really working well, and even the patch they
|
||||
# recommend applying on 0.9.2 won't apply. See:
|
||||
# https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README
|
||||
cmakeEnableFlag = "GR_CTRLPORT";
|
||||
native = [
|
||||
swig
|
||||
];
|
||||
};
|
||||
gnuradio-companion = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
pyyaml
|
||||
Mako
|
||||
numpy
|
||||
pygobject3
|
||||
];
|
||||
runtime = [
|
||||
gtk3
|
||||
pango
|
||||
gobject-introspection
|
||||
cairo
|
||||
];
|
||||
cmakeEnableFlag = "GRC";
|
||||
};
|
||||
gr-blocks = {
|
||||
cmakeEnableFlag = "GR_BLOCKS";
|
||||
};
|
||||
gr-fec = {
|
||||
cmakeEnableFlag = "GR_FEC";
|
||||
};
|
||||
gr-fft = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FFT";
|
||||
};
|
||||
gr-filter = {
|
||||
runtime = [ fftwFloat ];
|
||||
cmakeEnableFlag = "GR_FILTER";
|
||||
};
|
||||
gr-analog = {
|
||||
cmakeEnableFlag = "GR_ANALOG";
|
||||
};
|
||||
gr-digital = {
|
||||
cmakeEnableFlag = "GR_DIGITAL";
|
||||
};
|
||||
gr-dtv = {
|
||||
cmakeEnableFlag = "GR_DTV";
|
||||
};
|
||||
gr-audio = {
|
||||
runtime = []
|
||||
++ lib.optionals stdenv.isLinux [ alsaLib libjack2 ]
|
||||
++ lib.optionals stdenv.isDarwin [ CoreAudio ]
|
||||
;
|
||||
cmakeEnableFlag = "GR_AUDIO";
|
||||
};
|
||||
gr-channels = {
|
||||
cmakeEnableFlag = "GR_CHANNELS";
|
||||
};
|
||||
gr-qtgui = {
|
||||
runtime = [ qt5.qtbase libsForQt5.qwt ];
|
||||
pythonRuntime = [ python.pkgs.pyqt5 ];
|
||||
cmakeEnableFlag = "GR_QTGUI";
|
||||
};
|
||||
gr-trellis = {
|
||||
cmakeEnableFlag = "GR_TRELLIS";
|
||||
};
|
||||
gr-uhd = {
|
||||
runtime = [ uhd ];
|
||||
cmakeEnableFlag = "GR_UHD";
|
||||
};
|
||||
gr-utils = {
|
||||
cmakeEnableFlag = "GR_UTILS";
|
||||
};
|
||||
gr-modtool = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
click
|
||||
click-plugins
|
||||
];
|
||||
cmakeEnableFlag = "GR_MODTOOL";
|
||||
};
|
||||
gr-video-sdl = {
|
||||
runtime = [ SDL ];
|
||||
cmakeEnableFlag = "GR_VIDEO_SDL";
|
||||
};
|
||||
gr-vocoder = {
|
||||
runtime = [ codec2 gsm ];
|
||||
cmakeEnableFlag = "GR_VOCODER";
|
||||
};
|
||||
gr-wavelet = {
|
||||
cmakeEnableFlag = "GR_WAVELET";
|
||||
runtime = [ gsl ];
|
||||
};
|
||||
gr-zeromq = {
|
||||
runtime = [ cppzmq zeromq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
stdenv
|
||||
lib
|
||||
python
|
||||
removeReferencesTo
|
||||
featuresInfo
|
||||
features
|
||||
versionAttr
|
||||
sourceSha256
|
||||
overrideSrc
|
||||
fetchFromGitHub
|
||||
fetchSubmodules
|
||||
;
|
||||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit boost volk;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
|
||||
inherit uhd;
|
||||
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
|
||||
inherit (libsForQt5) qwt;
|
||||
};
|
||||
cmakeFlags = shared.cmakeFlags
|
||||
# From some reason, if these are not set, libcodec2 and gsm are not
|
||||
# detected properly. NOTE: qradiolink needs libcodec2 to be detected in
|
||||
# order to build, see https://github.com/qradiolink/qradiolink/issues/67
|
||||
++ lib.optionals (hasFeature "gr-vocoder" features) [
|
||||
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
|
||||
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
|
||||
"-DLIBCODEC2_HAS_FREEDV_API=ON"
|
||||
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
|
||||
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
|
||||
]
|
||||
++ lib.optionals (hasFeature "volk" features && volk != null) [
|
||||
"-DENABLE_INTERNAL_VOLK=OFF"
|
||||
]
|
||||
;
|
||||
|
||||
postInstall = shared.postInstall
|
||||
# This is the only python reference worth removing, if needed (3.7 doesn't
|
||||
# set that reference).
|
||||
+ lib.optionalString (!hasFeature "python-support" features) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
''
|
||||
;
|
||||
patches = [
|
||||
# Don't install python referencing files if python support is disabled.
|
||||
# See: https://github.com/gnuradio/gnuradio/pull/3839
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff";
|
||||
sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff";
|
||||
sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4=";
|
||||
})
|
||||
# Needed to use boost 1.7x, see:
|
||||
# https://github.com/gnuradio/gnuradio/issues/3720
|
||||
# https://github.com/gnuradio/gnuradio/pull/3967
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/cbcb968358fad56f3646619b258f18b0e6693a07.diff";
|
||||
sha256 = "1ajf4797f869lqv436xw61s29qdbn7f01i0970kfxv3yahd34p9v";
|
||||
})
|
||||
];
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, boost
|
||||
, gnuradio
|
||||
, makeWrapper
|
||||
, cppunit
|
||||
, gr-osmosdr
|
||||
, log4cpp
|
||||
, pythonSupport ? true
|
||||
, python
|
||||
, swig
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gr-ais";
|
||||
version = "2015-12-20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bistromath";
|
||||
repo = "gr-ais";
|
||||
rev = "cdc1f52745853f9c739c718251830eb69704b26e";
|
||||
sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054.patch";
|
||||
sha256 = "1cwalphldvf6dbhzwz1gi53z0cb4921qsvlz4138q7m6dxccvssg";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
||||
buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ]
|
||||
++ lib.optionals pythonSupport [ python swig ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with 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 ];
|
||||
};
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
# Remove gcc and python references
|
||||
, removeReferencesTo
|
||||
, pkg-config
|
||||
, volk
|
||||
, cppunit
|
||||
, swig
|
||||
, orc
|
||||
, boost
|
||||
, log4cpp
|
||||
|
@ -22,8 +22,13 @@
|
|||
, uhd
|
||||
, SDL
|
||||
, gsl
|
||||
, libsodium
|
||||
, libsndfile
|
||||
, libunwind
|
||||
, cppzmq
|
||||
, zeromq
|
||||
# Needed only if qt-gui is disabled, from some reason
|
||||
, icu
|
||||
# GUI related
|
||||
, gtk3
|
||||
, pango
|
||||
|
@ -38,16 +43,15 @@
|
|||
, overrideSrc ? {}
|
||||
, pname ? "gnuradio"
|
||||
, versionAttr ? {
|
||||
major = "3.8";
|
||||
minor = "2";
|
||||
major = "3.9";
|
||||
minor = "0";
|
||||
patch = "0";
|
||||
}
|
||||
# Should be false on the release after 3.8.2.0
|
||||
, fetchSubmodules ? true
|
||||
, fetchSubmodules ? false
|
||||
}:
|
||||
|
||||
let
|
||||
sourceSha256 = "1mnfwdy7w3160vi6110x2qkyq8l78qi8771zwak9n72bl7lhhpnf";
|
||||
sourceSha256 = "ZjQzioAuWrd8jsYOnLNH1mK4n9EbrjgvPX3mTzVFdLk=";
|
||||
featuresInfo = {
|
||||
# Needed always
|
||||
basic = {
|
||||
|
@ -57,32 +61,26 @@ let
|
|||
orc
|
||||
];
|
||||
runtime = [
|
||||
volk
|
||||
boost
|
||||
log4cpp
|
||||
mpir
|
||||
];
|
||||
]
|
||||
# when gr-qtgui is disabled, icu needs to be included, otherwise
|
||||
# building with boost 1.7x fails
|
||||
++ lib.optionals (!(hasFeature "gr-qtgui" features)) [ icu ];
|
||||
pythonNative = with python.pkgs; [
|
||||
Mako
|
||||
six
|
||||
];
|
||||
};
|
||||
# NOTE: Should be removed on the release after 3.8.2.0, see:
|
||||
# https://github.com/gnuradio/gnuradio/commit/80c04479d
|
||||
volk = {
|
||||
cmakeEnableFlag = "VOLK";
|
||||
};
|
||||
doxygen = {
|
||||
native = [ doxygen ];
|
||||
cmakeEnableFlag = "DOXYGEN";
|
||||
};
|
||||
sphinx = {
|
||||
pythonNative = with python.pkgs; [ sphinx ];
|
||||
cmakeEnableFlag = "SPHINX";
|
||||
};
|
||||
python-support = {
|
||||
pythonRuntime = [ python.pkgs.six ];
|
||||
native = [
|
||||
swig
|
||||
python
|
||||
];
|
||||
cmakeEnableFlag = "PYTHON";
|
||||
|
@ -91,17 +89,23 @@ let
|
|||
native = [ cppunit ];
|
||||
cmakeEnableFlag = "TESTING";
|
||||
};
|
||||
post-install = {
|
||||
cmakeEnableFlag = "POSTINSTALL";
|
||||
};
|
||||
gnuradio-runtime = {
|
||||
cmakeEnableFlag = "GNURADIO_RUNTIME";
|
||||
pythonRuntime = [
|
||||
python.pkgs.pybind11
|
||||
];
|
||||
};
|
||||
gr-ctrlport = {
|
||||
# Thrift support is not really working well, and even the patch they
|
||||
# recommend applying on 0.9.2 won't apply. See:
|
||||
# https://github.com/gnuradio/gnuradio/blob/v3.8.2.0/gnuradio-runtime/lib/controlport/thrift/README
|
||||
cmakeEnableFlag = "GR_CTRLPORT";
|
||||
native = [
|
||||
swig
|
||||
# https://github.com/gnuradio/gnuradio/blob/v3.9.0.0/gnuradio-runtime/lib/controlport/thrift/README
|
||||
runtime = [
|
||||
libunwind
|
||||
];
|
||||
cmakeEnableFlag = "GR_CTRLPORT";
|
||||
};
|
||||
gnuradio-companion = {
|
||||
pythonRuntime = with python.pkgs; [
|
||||
|
@ -110,11 +114,15 @@ let
|
|||
numpy
|
||||
pygobject3
|
||||
];
|
||||
native = [
|
||||
python.pkgs.pytest
|
||||
];
|
||||
runtime = [
|
||||
gtk3
|
||||
pango
|
||||
gobject-introspection
|
||||
cairo
|
||||
libsndfile
|
||||
];
|
||||
cmakeEnableFlag = "GRC";
|
||||
};
|
||||
|
@ -160,7 +168,9 @@ let
|
|||
cmakeEnableFlag = "GR_TRELLIS";
|
||||
};
|
||||
gr-uhd = {
|
||||
runtime = [ uhd ];
|
||||
runtime = [
|
||||
uhd
|
||||
];
|
||||
cmakeEnableFlag = "GR_UHD";
|
||||
};
|
||||
gr-utils = {
|
||||
|
@ -173,22 +183,29 @@ let
|
|||
];
|
||||
cmakeEnableFlag = "GR_MODTOOL";
|
||||
};
|
||||
gr-blocktool = {
|
||||
cmakeEnableFlag = "GR_BLOCKTOOL";
|
||||
};
|
||||
gr-video-sdl = {
|
||||
runtime = [ SDL ];
|
||||
cmakeEnableFlag = "GR_VIDEO_SDL";
|
||||
};
|
||||
gr-vocoder = {
|
||||
runtime = [ codec2 gsm ];
|
||||
cmakeEnableFlag = "GR_VOCODER";
|
||||
};
|
||||
# codec2 and gsm support is broken with gr3.9: https://github.com/gnuradio/gnuradio/issues/4278
|
||||
# gr-vocoder = {
|
||||
# runtime = [ codec2 gsm ];
|
||||
# cmakeEnableFlag = "GR_VOCODER";
|
||||
# };
|
||||
gr-wavelet = {
|
||||
cmakeEnableFlag = "GR_WAVELET";
|
||||
runtime = [ gsl ];
|
||||
runtime = [ gsl libsodium ];
|
||||
};
|
||||
gr-zeromq = {
|
||||
runtime = [ cppzmq zeromq ];
|
||||
cmakeEnableFlag = "GR_ZEROMQ";
|
||||
};
|
||||
gr-network = {
|
||||
cmakeEnableFlag = "GR_NETWORK";
|
||||
};
|
||||
};
|
||||
shared = (import ./shared.nix {
|
||||
inherit
|
||||
|
@ -207,84 +224,42 @@ let
|
|||
qt = qt5;
|
||||
gtk = gtk3;
|
||||
});
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
hasFeature # function
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
passthru
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
cmakeFlags = shared.cmakeFlags
|
||||
# From some reason, if these are not set, libcodec2 and gsm are not
|
||||
# detected properly. NOTE: qradiolink needs libcodec2 to be detected in
|
||||
# order to build, see https://github.com/qradiolink/qradiolink/issues/67
|
||||
++ lib.optionals (hasFeature "gr-vocoder" features) [
|
||||
"-DLIBCODEC2_LIBRARIES=${codec2}/lib/libcodec2.so"
|
||||
"-DLIBCODEC2_INCLUDE_DIRS=${codec2}/include"
|
||||
"-DLIBCODEC2_HAS_FREEDV_API=ON"
|
||||
"-DLIBGSM_LIBRARIES=${gsm}/lib/libgsm.so"
|
||||
"-DLIBGSM_INCLUDE_DIRS=${gsm}/include/gsm"
|
||||
]
|
||||
;
|
||||
|
||||
postInstall = shared.postInstall
|
||||
# This is the only python reference worth removing, if needed (3.7 doesn't
|
||||
# set that reference).
|
||||
+ lib.optionalString (!hasFeature "python-support" features) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
''
|
||||
;
|
||||
preConfigure = ""
|
||||
# If python-support is disabled, don't install volk's (git submodule)
|
||||
# volk_modtool - it references python.
|
||||
#
|
||||
# NOTE: on the next release, volk will always be required to be installed
|
||||
# externally (submodule removed upstream). Hence this hook will fail and
|
||||
# we'll need to package volk while able to tell it to install or not
|
||||
# install python referencing files. When we'll be there, this will help:
|
||||
# https://github.com/gnuradio/volk/pull/404
|
||||
+ lib.optionalString (!hasFeature "python-support" features) ''
|
||||
sed -i -e "/python\/volk_modtool/d" volk/CMakeLists.txt
|
||||
''
|
||||
;
|
||||
patches = [
|
||||
# Don't install python referencing files if python support is disabled.
|
||||
# See: https://github.com/gnuradio/gnuradio/pull/3839
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/4a4fd570b398b0b50fe875fcf0eb9c9db2ea5c6e.diff";
|
||||
sha256 = "xz2E0ji6zfdOAhjfPecAcaVOIls1XP8JngLkBbBBW5Q=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/gnuradio/commit/dbc8ad7e7361fddc7b1dbc267c07a776a3f9664b.diff";
|
||||
sha256 = "tQcCpcUbJv3yqAX8rSHN/pAuBq4ueEvoVo7sNzZGvf4=";
|
||||
})
|
||||
];
|
||||
inherit (shared) hasFeature; # function
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
inherit
|
||||
pname
|
||||
inherit pname;
|
||||
inherit (shared)
|
||||
version
|
||||
src
|
||||
nativeBuildInputs
|
||||
buildInputs
|
||||
cmakeFlags
|
||||
preConfigure
|
||||
# disallowedReferences
|
||||
disallowedReferences
|
||||
stripDebugList
|
||||
patches
|
||||
postInstall
|
||||
passthru
|
||||
doCheck
|
||||
dontWrapPythonPrograms
|
||||
dontWrapQtApps
|
||||
meta
|
||||
;
|
||||
passthru = shared.passthru // {
|
||||
# Deps that are potentially overriden and are used inside GR plugins - the same version must
|
||||
inherit boost volk;
|
||||
} // lib.optionalAttrs (hasFeature "gr-uhd" features) {
|
||||
inherit uhd;
|
||||
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
|
||||
inherit (libsForQt5) qwt;
|
||||
};
|
||||
|
||||
postInstall = shared.postInstall
|
||||
# This is the only python reference worth removing, if needed.
|
||||
# Even if python support is enabled, and we don't care about this
|
||||
# reference, pybind's path is not properly set. See:
|
||||
# https://github.com/gnuradio/gnuradio/issues/4380
|
||||
+ lib.optionalString (!hasFeature "python-support" features) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $out/lib/cmake/gnuradio/GnuradioConfig.cmake
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python} $(readlink -f $out/lib/libgnuradio-runtime.so)
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${python.pkgs.pybind11} $out/lib/cmake/gnuradio/gnuradio-runtimeTargets.cmake
|
||||
''
|
||||
;
|
||||
}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
|
||||
, makeWrapper, cppunit, libosmocore, gr-osmosdr
|
||||
, pythonSupport ? true, python, swig
|
||||
}:
|
||||
|
||||
assert pythonSupport -> python != null && swig != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "gr-gsm";
|
||||
version = "2016-08-25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ptrkrysik";
|
||||
repo = "gr-gsm";
|
||||
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
|
||||
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp
|
||||
] ++ lib.optionals pythonSupport [ python swig ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for gsm";
|
||||
homepage = "https://github.com/ptrkrysik/gr-gsm";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio
|
||||
, pythonSupport ? true, python, swig, limesuite, log4cpp
|
||||
} :
|
||||
|
||||
assert pythonSupport -> python != null && swig != null;
|
||||
|
||||
let
|
||||
version = "2.0.0";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "gr-limesdr";
|
||||
inherit version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "myriadrf";
|
||||
repo = "gr-limesdr";
|
||||
rev = "v${version}";
|
||||
sha256 = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
] ++ lib.optionals pythonSupport [ swig ];
|
||||
|
||||
buildInputs = [
|
||||
boost gnuradio limesuite log4cpp
|
||||
] ++ lib.optionals pythonSupport [ python ];
|
||||
|
||||
|
||||
meta = with 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 ];
|
||||
};
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{ lib, stdenv, fetchgit, cmake, pkg-config, makeWrapper
|
||||
, boost
|
||||
, pythonSupport ? true, python, swig
|
||||
, airspy
|
||||
, gnuradio
|
||||
, hackrf
|
||||
, libbladeRF
|
||||
, rtl-sdr
|
||||
, soapysdr-with-plugins
|
||||
, uhd
|
||||
, log4cpp
|
||||
}:
|
||||
|
||||
assert pythonSupport -> python != null && swig != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gr-osmosdr";
|
||||
version = "0.1.5";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.osmocom.org/gr-osmosdr";
|
||||
rev = "v${version}";
|
||||
sha256 = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
||||
buildInputs = [
|
||||
boost log4cpp airspy gnuradio hackrf libbladeRF rtl-sdr uhd
|
||||
] ++ lib.optionals stdenv.isLinux [ soapysdr-with-plugins ]
|
||||
++ lib.optionals pythonSupport [ python swig python.pkgs.cheetah ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with 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 ];
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
|
||||
, makeWrapper, pythonSupport ? true, python, swig
|
||||
}:
|
||||
|
||||
assert pythonSupport -> python != null && swig != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gr-rds";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bastibl";
|
||||
repo = "gr-rds";
|
||||
rev = "v${version}";
|
||||
sha256 = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
boost gnuradio makeWrapper log4cpp
|
||||
] ++ lib.optionals pythonSupport [ python swig ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with 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 ];
|
||||
};
|
||||
}
|
|
@ -85,9 +85,6 @@ rec {
|
|||
;
|
||||
postInstall = ""
|
||||
# Gcc references
|
||||
+ lib.optionalString (hasFeature "volk" features) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
|
||||
''
|
||||
+ lib.optionalString (hasFeature "gnuradio-runtime" features) ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libgnuradio-runtime.so)
|
||||
''
|
||||
|
@ -103,9 +100,11 @@ rec {
|
|||
features
|
||||
featuresInfo
|
||||
python
|
||||
qt
|
||||
gtk
|
||||
;
|
||||
} // lib.optionalAttrs (hasFeature "gr-qtgui" features) {
|
||||
inherit qt;
|
||||
} // lib.optionalAttrs (hasFeature "gnuradio-companion" features) {
|
||||
inherit gtk;
|
||||
};
|
||||
# Wrapping is done with an external wrapper
|
||||
dontWrapPythonPrograms = true;
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
# The unwrapped gnuradio derivation
|
||||
, unwrapped
|
||||
# If it's a minimal build, we don't want to wrap it with lndir and
|
||||
# wrapProgram..
|
||||
, wrap ? true
|
||||
# For the wrapper
|
||||
, makeWrapper
|
||||
# For lndir
|
||||
, xorg
|
||||
# To define a the gnuradio.pkgs scope
|
||||
, newScope
|
||||
# For Emulating wrapGAppsHook
|
||||
, gsettings-desktop-schemas
|
||||
, glib
|
||||
|
@ -37,12 +44,16 @@ let
|
|||
[]
|
||||
)
|
||||
) unwrapped.featuresInfo)
|
||||
++ lib.optionals (unwrapped.hasFeature "python-support" unwrapped.features) [
|
||||
# Add unwrapped itself as a python module
|
||||
(unwrapped.python.pkgs.toPythonModule unwrapped)
|
||||
]
|
||||
++ lib.optionals
|
||||
(unwrapped.hasFeature "python-support" unwrapped.features)
|
||||
(
|
||||
# Add unwrapped itself as a python module
|
||||
[ (unwrapped.python.pkgs.toPythonModule unwrapped) ]
|
||||
# Add all extraPackages as python modules
|
||||
++ (builtins.map unwrapped.python.pkgs.toPythonModule extraPackages)
|
||||
)
|
||||
;
|
||||
python3Env = unwrapped.python.withPackages(ps: pythonPkgs);
|
||||
pythonEnv = unwrapped.python.withPackages(ps: pythonPkgs);
|
||||
|
||||
name = (lib.appendToName "wrapped" unwrapped).name;
|
||||
makeWrapperArgs = builtins.concatStringsSep " " ([
|
||||
|
@ -88,48 +99,84 @@ let
|
|||
(if unwrapped.versionAttr.major == "3.8" then
|
||||
[
|
||||
"--prefix" "QT_PLUGIN_PATH" ":"
|
||||
"${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtPluginPrefix}"
|
||||
"${
|
||||
lib.makeSearchPath
|
||||
unwrapped.qt.qtbase.qtPluginPrefix
|
||||
(builtins.map lib.getBin [
|
||||
unwrapped.qt.qtbase
|
||||
unwrapped.qt.qtwayland
|
||||
])
|
||||
}"
|
||||
"--prefix" "QML2_IMPORT_PATH" ":"
|
||||
"${lib.getBin unwrapped.qt.qtbase}/${unwrapped.qt.qtbase.qtQmlPrefix}"
|
||||
"${
|
||||
lib.makeSearchPath
|
||||
unwrapped.qt.qtbase.qtQmlPrefix
|
||||
(builtins.map lib.getBin [
|
||||
unwrapped.qt.qtbase
|
||||
unwrapped.qt.qtwayland
|
||||
])
|
||||
}"
|
||||
]
|
||||
else
|
||||
# TODO: Add here qt4 related environment for 3.7?
|
||||
# Add here qt4 related environment for 3.7?
|
||||
[
|
||||
|
||||
]
|
||||
)
|
||||
++ extraMakeWrapperArgs
|
||||
);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
xorg.lndir
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit python3Env pythonPkgs unwrapped;
|
||||
packages = import ../../../top-level/gnuradio-packages.nix {
|
||||
inherit lib stdenv newScope;
|
||||
gnuradio = unwrapped;
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
lndir -silent ${unwrapped}
|
||||
for i in $out/bin/*; do
|
||||
if [[ ! -x "$i" ]]; then
|
||||
continue
|
||||
fi
|
||||
cp -L "$i" "$i".tmp
|
||||
mv -f "$i".tmp "$i"
|
||||
if head -1 "$i" | grep -q ${unwrapped.python}; then
|
||||
substituteInPlace "$i" \
|
||||
--replace ${unwrapped.python} ${python3Env}
|
||||
fi
|
||||
wrapProgram "$i" ${makeWrapperArgs}
|
||||
done
|
||||
'';
|
||||
|
||||
inherit (unwrapped) meta;
|
||||
}
|
||||
passthru = unwrapped.passthru // {
|
||||
inherit
|
||||
pythonEnv
|
||||
pythonPkgs
|
||||
unwrapped
|
||||
;
|
||||
pkgs = packages;
|
||||
};
|
||||
self = if wrap then
|
||||
stdenv.mkDerivation {
|
||||
inherit name passthru;
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
xorg.lndir
|
||||
];
|
||||
buildCommand = ''
|
||||
mkdir $out
|
||||
cd $out
|
||||
lndir -silent ${unwrapped}
|
||||
${lib.optionalString
|
||||
(extraPackages != [])
|
||||
(builtins.concatStringsSep "\n"
|
||||
(builtins.map (pkg: ''
|
||||
if [[ -d ${lib.getBin pkg}/bin/ ]]; then
|
||||
lndir -silent ${pkg}/bin ./bin
|
||||
fi
|
||||
'') extraPackages)
|
||||
)
|
||||
}
|
||||
for i in $out/bin/*; do
|
||||
if [[ ! -x "$i" ]]; then
|
||||
continue
|
||||
fi
|
||||
cp -L "$i" "$i".tmp
|
||||
mv -f "$i".tmp "$i"
|
||||
if head -1 "$i" | grep -q ${unwrapped.python}; then
|
||||
substituteInPlace "$i" \
|
||||
--replace ${unwrapped.python} ${pythonEnv}
|
||||
fi
|
||||
wrapProgram "$i" ${makeWrapperArgs}
|
||||
done
|
||||
'';
|
||||
inherit (unwrapped) meta;
|
||||
}
|
||||
else
|
||||
unwrapped.overrideAttrs(_: {
|
||||
inherit passthru;
|
||||
})
|
||||
;
|
||||
in self
|
||||
|
|
|
@ -1,13 +1,23 @@
|
|||
{ lib, fetchFromGitHub, cmake, qtbase, qtsvg, gnuradio, boost, gr-osmosdr
|
||||
, mkDerivation
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, qt5
|
||||
, gnuradio3_8Minimal
|
||||
, log4cpp
|
||||
, mpir
|
||||
, fftwFloat
|
||||
, alsaLib
|
||||
, libjack2
|
||||
# drivers (optional):
|
||||
, rtl-sdr, hackrf
|
||||
, rtl-sdr
|
||||
, hackrf
|
||||
, pulseaudioSupport ? true, libpulseaudio
|
||||
}:
|
||||
|
||||
assert pulseaudioSupport -> libpulseaudio != null;
|
||||
|
||||
mkDerivation rec {
|
||||
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||
pname = "gqrx";
|
||||
version = "2.14.4";
|
||||
|
||||
|
@ -18,9 +28,23 @@ mkDerivation rec {
|
|||
sha256 = "sha256-mMaxu0jq2GaNLWjLsJQXx+zCxtyiCAZQJJZ8GJtnllQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
qt5.wrapQtAppsHook
|
||||
];
|
||||
buildInputs = [
|
||||
qtbase qtsvg gnuradio boost gr-osmosdr rtl-sdr hackrf
|
||||
log4cpp
|
||||
mpir
|
||||
fftwFloat
|
||||
alsaLib
|
||||
libjack2
|
||||
gnuradio3_8Minimal.unwrapped.boost
|
||||
qt5.qtbase
|
||||
qt5.qtsvg
|
||||
gnuradio3_8Minimal.pkgs.osmosdr
|
||||
rtl-sdr
|
||||
hackrf
|
||||
] ++ lib.optionals pulseaudioSupport [ libpulseaudio ];
|
||||
|
||||
postInstall = ''
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, gnuradio3_8Minimal
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, cmake
|
||||
, boost
|
||||
, fftwFloat
|
||||
, gnuradio
|
||||
, qt5
|
||||
, liquid-dsp
|
||||
, qtbase
|
||||
, wrapQtAppsHook
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
gnuradio3_8Minimal.pkgs.mkDerivation rec {
|
||||
pname = "inspectrum";
|
||||
version = "0.2.3";
|
||||
|
||||
|
@ -22,13 +19,15 @@ mkDerivation rec {
|
|||
sha256 = "1x6nyn429pk0f7lqzskrgsbq09mq5787xd4piic95add6n1cc355";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
qt5.wrapQtAppsHook
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
fftwFloat
|
||||
boost
|
||||
gnuradio
|
||||
liquid-dsp
|
||||
qtbase
|
||||
qt5.qtbase
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
|
@ -1,51 +1,71 @@
|
|||
{ lib, stdenv, fetchFromGitHub, alsaLib, boost
|
||||
, qt4, libpulseaudio, codec2, libconfig
|
||||
, gnuradio, gr-osmosdr, gsm
|
||||
, libopus, libjpeg, protobuf, qwt, speex
|
||||
} :
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, libpulseaudio
|
||||
, libconfig
|
||||
# Needs a gnuradio built with qt gui support
|
||||
, gnuradio3_8
|
||||
# Not gnuradioPackages'
|
||||
, codec2
|
||||
, log4cpp
|
||||
, gmp
|
||||
, gsm
|
||||
, libopus
|
||||
, libjpeg
|
||||
, libsndfile
|
||||
, libftdi
|
||||
, protobuf
|
||||
, speex
|
||||
, speexdsp
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.5.0";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
gnuradio3_8.pkgs.mkDerivation rec {
|
||||
pname = "qradiolink";
|
||||
inherit version;
|
||||
version = "0.8.5-2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kantooon";
|
||||
owner = "qradiolink";
|
||||
repo = "qradiolink";
|
||||
rev = version;
|
||||
sha256 = "0xhg5zhjznmls5m3rhpk1qx0dipxmca12s85w15d0i7qwva2f1gi";
|
||||
sha256 = "MgHfKR3AJW3pIN9oCBr4BWxk1fGSCpLmMzjxvuTmuFA=";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
cd ext
|
||||
cd src/ext
|
||||
protoc --cpp_out=. Mumble.proto
|
||||
protoc --cpp_out=. QRadioLink.proto
|
||||
cd ..
|
||||
cd ../..
|
||||
qmake
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp qradiolink $out/bin
|
||||
install -D qradiolink $out/bin/qradiolink
|
||||
install -Dm644 src/res/icon.png $out/share/pixmaps/qradiolink.png
|
||||
install -Dm644 qradiolink.desktop $out/share/applications/qradiolink.desktop
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
qt4
|
||||
alsaLib
|
||||
boost
|
||||
libpulseaudio
|
||||
gnuradio3_8.unwrapped.boost
|
||||
codec2
|
||||
log4cpp
|
||||
gmp
|
||||
libpulseaudio
|
||||
libconfig
|
||||
gsm
|
||||
gnuradio
|
||||
gr-osmosdr
|
||||
gnuradio3_8.pkgs.osmosdr
|
||||
libopus
|
||||
libjpeg
|
||||
protobuf
|
||||
speex
|
||||
qwt
|
||||
speexdsp
|
||||
gnuradio3_8.qt.qtbase
|
||||
gnuradio3_8.qt.qtmultimedia
|
||||
libftdi
|
||||
libsndfile
|
||||
gnuradio3_8.qwt
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
protobuf
|
||||
gnuradio3_8.qt.qmake
|
||||
gnuradio3_8.qt.wrapQtAppsHook
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
159
pkgs/applications/radio/uhd/3.5.nix
Normal file
159
pkgs/applications/radio/uhd/3.5.nix
Normal file
|
@ -0,0 +1,159 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
# See https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html for dependencies explanations
|
||||
, boost
|
||||
, enableLibuhd_C_api ? true
|
||||
# requires numpy
|
||||
, enableLibuhd_Python_api ? false
|
||||
, python3
|
||||
, enableExamples ? false
|
||||
, enableUtils ? false
|
||||
, enableLiberio ? false
|
||||
, liberio
|
||||
, libusb1
|
||||
, enableDpdk ? false
|
||||
, dpdk
|
||||
# Devices
|
||||
, enableOctoClock ? true
|
||||
, enableMpmd ? true
|
||||
, enableB100 ? true
|
||||
, enableB200 ? true
|
||||
, enableUsrp1 ? true
|
||||
, enableUsrp2 ? true
|
||||
, enableX300 ? true
|
||||
, enableN230 ? true
|
||||
, enableN300 ? true
|
||||
, enableN320 ? true
|
||||
, enableE300 ? true
|
||||
, enableE320 ? true
|
||||
}:
|
||||
|
||||
let
|
||||
onOffBool = b: if b then "ON" else "OFF";
|
||||
inherit (lib) optionals;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "uhd";
|
||||
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
|
||||
# and xxx.yyy.zzz. Hrmpf... style keeps changing
|
||||
version = "3.15.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EttusResearch";
|
||||
repo = "uhd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf";
|
||||
};
|
||||
# Firmware images are downloaded (pre-built) from the respective release on Github
|
||||
uhdImagesSrc = fetchurl {
|
||||
url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
|
||||
sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
"-DENABLE_LIBUHD=ON"
|
||||
"-DENABLE_USB=ON"
|
||||
"-DENABLE_TESTS=ON" # This installs tests as well so we delete them via postPhases
|
||||
"-DENABLE_EXAMPLES=${onOffBool enableExamples}"
|
||||
"-DENABLE_UTILS=${onOffBool enableUtils}"
|
||||
"-DENABLE_LIBUHD_C_API=${onOffBool enableLibuhd_C_api}"
|
||||
"-DENABLE_LIBUHD_PYTHON_API=${onOffBool enableLibuhd_Python_api}"
|
||||
"-DENABLE_LIBERIO=${onOffBool enableLiberio}"
|
||||
"-DENABLE_DPDK=${onOffBool enableDpdk}"
|
||||
# Devices
|
||||
"-DENABLE_OCTOCLOCK=${onOffBool enableOctoClock}"
|
||||
"-DENABLE_MPMD=${onOffBool enableMpmd}"
|
||||
"-DENABLE_B100=${onOffBool enableB100}"
|
||||
"-DENABLE_B200=${onOffBool enableB200}"
|
||||
"-DENABLE_USRP1=${onOffBool enableUsrp1}"
|
||||
"-DENABLE_USRP2=${onOffBool enableUsrp2}"
|
||||
"-DENABLE_X300=${onOffBool enableX300}"
|
||||
"-DENABLE_N230=${onOffBool enableN230}"
|
||||
"-DENABLE_N300=${onOffBool enableN300}"
|
||||
"-DENABLE_N320=${onOffBool enableN320}"
|
||||
"-DENABLE_E300=${onOffBool enableE300}"
|
||||
"-DENABLE_E320=${onOffBool enableE320}"
|
||||
]
|
||||
# TODO: Check if this still needed
|
||||
# ABI differences GCC 7.1
|
||||
# /nix/store/wd6r25miqbk9ia53pp669gn4wrg9n9cj-gcc-7.3.0/include/c++/7.3.0/bits/vector.tcc:394:7: note: parameter passing for argument of type 'std::vector<uhd::range_t>::iterator {aka __gnu_cxx::__normal_iterator<uhd::range_t*, std::vector<uhd::range_t> >}' changed in GCC 7.1
|
||||
++ [ (lib.optionalString stdenv.isAarch32 "-DCMAKE_CXX_FLAGS=-Wno-psabi") ]
|
||||
;
|
||||
|
||||
# Python + Mako are always required for the build itself but not necessary for runtime.
|
||||
pythonEnv = python3.withPackages (ps: with ps; [ Mako ]
|
||||
++ optionals (enableLibuhd_Python_api) [ numpy setuptools ]
|
||||
++ optionals (enableUtils) [ requests six ]
|
||||
);
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
]
|
||||
# If both enableLibuhd_Python_api and enableUtils are off, we don't need
|
||||
# pythonEnv in buildInputs as it's a 'build' dependency and not a runtime
|
||||
# dependency
|
||||
++ optionals (!enableLibuhd_Python_api && !enableUtils) [ pythonEnv ]
|
||||
;
|
||||
buildInputs = [
|
||||
boost
|
||||
libusb1
|
||||
]
|
||||
# However, if enableLibuhd_Python_api *or* enableUtils is on, we need
|
||||
# pythonEnv for runtime as well. The utilities' runtime dependencies are
|
||||
# handled at the environment
|
||||
++ optionals (enableLibuhd_Python_api || enableUtils) [ pythonEnv ]
|
||||
++ optionals (enableLiberio) [ liberio ]
|
||||
++ optionals (enableDpdk) [ dpdk ]
|
||||
;
|
||||
|
||||
doCheck = true;
|
||||
|
||||
# Build only the host software
|
||||
preConfigure = "cd host";
|
||||
# TODO: Check if this still needed, perhaps relevant:
|
||||
# https://files.ettus.com/manual_archive/v3.15.0.0/html/page_build_guide.html#build_instructions_unix_arm
|
||||
patches = if stdenv.isAarch32 then ./neon.patch else null;
|
||||
|
||||
postPhases = [ "installFirmware" "removeInstalledTests" ]
|
||||
++ optionals (enableUtils) [ "moveUdevRules" ]
|
||||
;
|
||||
|
||||
# UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
|
||||
installFirmware = ''
|
||||
mkdir -p "$out/share/uhd/images"
|
||||
tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images"
|
||||
'';
|
||||
|
||||
# -DENABLE_TESTS=ON installs the tests, we don't need them in the output
|
||||
removeInstalledTests = ''
|
||||
rm -r $out/lib/uhd/tests
|
||||
'';
|
||||
|
||||
# Moves the udev rules to the standard location, needed only if utils are
|
||||
# enabled
|
||||
moveUdevRules = ''
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
mv $out/lib/uhd/utils/uhd-usrp.rules $out/lib/udev/rules.d/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "USRP Hardware Driver (for Software Defined Radio)";
|
||||
longDescription = ''
|
||||
The USRP Hardware Driver (UHD) software is the hardware driver for all
|
||||
USRP (Universal Software Radio Peripheral) devices.
|
||||
|
||||
USRP devices are designed and sold by Ettus Research, LLC and its parent
|
||||
company, National Instruments.
|
||||
'';
|
||||
homepage = "https://uhd.ettus.com/";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ bjornfor fpletz tomberek ];
|
||||
};
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
{ lib, stdenv
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
|
@ -8,14 +9,14 @@
|
|||
, enableLibuhd_C_api ? true
|
||||
# requires numpy
|
||||
, enableLibuhd_Python_api ? false
|
||||
, python3 ? null
|
||||
, python3
|
||||
, enableExamples ? false
|
||||
, enableUtils ? false
|
||||
, enableLiberio ? false
|
||||
, liberio ? null
|
||||
, libusb1 ? null
|
||||
, liberio
|
||||
, libusb1
|
||||
, enableDpdk ? false
|
||||
, dpdk ? null
|
||||
, dpdk
|
||||
# Devices
|
||||
, enableOctoClock ? true
|
||||
, enableMpmd ? true
|
||||
|
@ -40,18 +41,18 @@ stdenv.mkDerivation rec {
|
|||
pname = "uhd";
|
||||
# UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
|
||||
# and xxx.yyy.zzz. Hrmpf... style keeps changing
|
||||
version = "3.15.0.0";
|
||||
version = "4.0.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EttusResearch";
|
||||
repo = "uhd";
|
||||
rev = "v${version}";
|
||||
sha256 = "0jknln88a69fh244670nb7qrflbyv0vvdxfddb5g8ncpb6hcg8qf";
|
||||
sha256 = "NCyiI4pIPw0nBRFdUGpgZ/x2mWz+Qm78ZGACUnSbGSs=";
|
||||
};
|
||||
# Firmware images are downloaded (pre-built) from the respective release on Github
|
||||
uhdImagesSrc = fetchurl {
|
||||
url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
|
||||
sha256 = "1fir1a13ac07mqhm4sr34cixiqj2difxq0870qv1wr7a7cbfw6vp";
|
||||
sha256 = "Xfx0bsHUQ5+Dp+xk0sVWWP83oyXQcUH5AX4PNEE7fY4=";
|
||||
};
|
||||
|
||||
cmakeFlags = [
|
||||
|
|
45
pkgs/development/gnuradio-modules/ais/default.nix
Normal file
45
pkgs/development/gnuradio-modules/ais/default.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, python
|
||||
, boost
|
||||
, cppunit
|
||||
, log4cpp
|
||||
, osmosdr
|
||||
}:
|
||||
|
||||
mkDerivation rec {
|
||||
pname = "gr-ais";
|
||||
version = "2015-12-20";
|
||||
src = fetchFromGitHub {
|
||||
owner = "bistromath";
|
||||
repo = "gr-ais";
|
||||
rev = "cdc1f52745853f9c739c718251830eb69704b26e";
|
||||
sha256 = "1vl3kk8xr2mh5lf31zdld7yzmwywqffffah8iblxdzblgsdwxfl6";
|
||||
};
|
||||
disabledForGRafter = "3.8";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
python
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cppunit
|
||||
osmosdr
|
||||
boost
|
||||
log4cpp
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for ais";
|
||||
homepage = "https://github.com/bistromath/gr-ais";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
48
pkgs/development/gnuradio-modules/gsm/default.nix
Normal file
48
pkgs/development/gnuradio-modules/gsm/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, cppunit
|
||||
, swig
|
||||
, boost
|
||||
, log4cpp
|
||||
, python
|
||||
, libosmocore
|
||||
, osmosdr
|
||||
}:
|
||||
|
||||
mkDerivation {
|
||||
pname = "gr-gsm";
|
||||
version = "2016-08-25";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ptrkrysik";
|
||||
repo = "gr-gsm";
|
||||
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
|
||||
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
|
||||
};
|
||||
disabledForGRafter = "3.8";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
python
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cppunit
|
||||
log4cpp
|
||||
boost
|
||||
libosmocore
|
||||
osmosdr
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for gsm";
|
||||
homepage = "https://github.com/ptrkrysik/gr-gsm";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
61
pkgs/development/gnuradio-modules/limesdr/default.nix
Normal file
61
pkgs/development/gnuradio-modules/limesdr/default.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, gnuradio
|
||||
, cmake
|
||||
, pkg-config
|
||||
, doxygen
|
||||
, swig
|
||||
, python
|
||||
, log4cpp
|
||||
, mpir
|
||||
, boost
|
||||
, gmp
|
||||
, icu
|
||||
, limesuite
|
||||
}:
|
||||
|
||||
let
|
||||
version = {
|
||||
"3.7" = "2.0.0";
|
||||
"3.8" = "3.0.1";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchFromGitHub {
|
||||
owner = "myriadrf";
|
||||
repo = "gr-limesdr";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
|
||||
"3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
};
|
||||
in mkDerivation {
|
||||
pname = "gr-limesdr";
|
||||
inherit version src;
|
||||
disabledForGRafter = "3.9";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
python
|
||||
];
|
||||
buildInputs = [
|
||||
log4cpp
|
||||
mpir
|
||||
boost
|
||||
gmp
|
||||
icu
|
||||
limesuite
|
||||
];
|
||||
|
||||
meta = with 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 ];
|
||||
};
|
||||
}
|
25
pkgs/development/gnuradio-modules/mkDerivation.nix
Normal file
25
pkgs/development/gnuradio-modules/mkDerivation.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ lib
|
||||
, unwrapped
|
||||
}:
|
||||
|
||||
mkDerivation:
|
||||
|
||||
args:
|
||||
|
||||
# Check if it's supposed to not get built for the current gnuradio version
|
||||
if (builtins.hasAttr "disabledForGRafter" args) &&
|
||||
(lib.versionAtLeast unwrapped.versionAttr.major args.disabledForGRafter) then
|
||||
let name = args.name or "${args.pname}"; in
|
||||
throw "Package ${name} is incompatible with GNURadio ${unwrapped.versionAttr.major}"
|
||||
else
|
||||
|
||||
let
|
||||
args_ = {
|
||||
enableParallelBuilding = args.enableParallelBuilding or true;
|
||||
nativeBuildInputs = (args.nativeBuildInputs or []);
|
||||
# We add gnuradio and volk itself by default - most gnuradio based packages
|
||||
# will not consider it a depenency worth mentioning and it will almost
|
||||
# always be needed
|
||||
buildInputs = (args.buildInputs or []) ++ [ unwrapped unwrapped.volk ];
|
||||
};
|
||||
in mkDerivation (args // args_)
|
|
@ -1,31 +1,40 @@
|
|||
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, uhd
|
||||
, makeWrapper, libsodium, cppunit, log4cpp
|
||||
, pythonSupport ? true, python, swig
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, cppunit
|
||||
, swig
|
||||
, boost
|
||||
, log4cpp
|
||||
, python
|
||||
, libsodium
|
||||
}:
|
||||
|
||||
assert pythonSupport -> python != null && swig != null;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
mkDerivation {
|
||||
pname = "gr-nacl";
|
||||
version = "2017-04-10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "stwunsch";
|
||||
repo = "gr-nacl";
|
||||
rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765";
|
||||
sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v";
|
||||
};
|
||||
disabledForGRafter = "3.8";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
python
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [
|
||||
boost gnuradio uhd makeWrapper libsodium cppunit log4cpp
|
||||
] ++ lib.optionals pythonSupport [ python swig ];
|
||||
|
||||
postInstall = ''
|
||||
for prog in "$out"/bin/*; do
|
||||
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
||||
done
|
||||
'';
|
||||
cppunit
|
||||
log4cpp
|
||||
boost
|
||||
libsodium
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for encryption";
|
86
pkgs/development/gnuradio-modules/osmosdr/default.nix
Normal file
86
pkgs/development/gnuradio-modules/osmosdr/default.nix
Normal file
|
@ -0,0 +1,86 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchgit
|
||||
, gnuradio
|
||||
, cmake
|
||||
, pkg-config
|
||||
, log4cpp
|
||||
, mpir
|
||||
, boost
|
||||
, gmp
|
||||
, fftwFloat
|
||||
, python
|
||||
, swig
|
||||
, uhd
|
||||
, icu
|
||||
, airspy
|
||||
, hackrf
|
||||
, libbladeRF
|
||||
, rtl-sdr
|
||||
, soapysdr-with-plugins
|
||||
}:
|
||||
|
||||
let
|
||||
version = {
|
||||
"3.7" = "0.1.5";
|
||||
"3.8" = "0.2.2";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchgit {
|
||||
url = "git://git.osmocom.org/gr-osmosdr";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
||||
"3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs=";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
};
|
||||
in mkDerivation {
|
||||
pname = "gr-osmosdr";
|
||||
inherit version src;
|
||||
disabledForGRafter = "3.9";
|
||||
|
||||
buildInputs = [
|
||||
log4cpp
|
||||
mpir
|
||||
boost
|
||||
fftwFloat
|
||||
gmp
|
||||
icu
|
||||
airspy
|
||||
hackrf
|
||||
libbladeRF
|
||||
rtl-sdr
|
||||
soapysdr-with-plugins
|
||||
] ++ lib.optional (gnuradio.hasFeature "gr-uhd" gnuradio.features) [
|
||||
uhd
|
||||
];
|
||||
cmakeFlags = [
|
||||
(if (gnuradio.hasFeature "python-support" gnuradio.features) then
|
||||
"-DENABLE_PYTHON=ON"
|
||||
else
|
||||
"-DENABLE_PYTHON=OFF"
|
||||
)
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
] ++ lib.optionals (gnuradio.hasFeature "python-support" gnuradio.features) [
|
||||
(if (gnuradio.versionAttr.major == "3.7") then
|
||||
python.pkgs.cheetah
|
||||
else
|
||||
python.pkgs.Mako
|
||||
)
|
||||
python
|
||||
]
|
||||
;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for OsmoSDR and rtl-sdr";
|
||||
homepage = "https://sdr.osmocom.org/trac/wiki/GrOsmoSDR";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ bjornfor ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
59
pkgs/development/gnuradio-modules/rds/default.nix
Normal file
59
pkgs/development/gnuradio-modules/rds/default.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, gnuradio
|
||||
, cmake
|
||||
, pkg-config
|
||||
, swig
|
||||
, python
|
||||
, log4cpp
|
||||
, mpir
|
||||
, boost
|
||||
, gmp
|
||||
, icu
|
||||
}:
|
||||
|
||||
let
|
||||
version = {
|
||||
"3.7" = "1.1.0";
|
||||
"3.8" = "3.8.0";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchFromGitHub {
|
||||
owner = "bastibl";
|
||||
repo = "gr-rds";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
|
||||
"3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
|
||||
"3.9" = null;
|
||||
}.${gnuradio.versionAttr.major};
|
||||
};
|
||||
in mkDerivation {
|
||||
pname = "gr-rds";
|
||||
inherit version src;
|
||||
disabledForGRafter = "3.9";
|
||||
|
||||
buildInputs = [
|
||||
log4cpp
|
||||
mpir
|
||||
boost
|
||||
gmp
|
||||
icu
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
swig
|
||||
python
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for radio data system";
|
||||
homepage = "https://github.com/bastibl/gr-rds";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
51
pkgs/development/libraries/volk/default.nix
Normal file
51
pkgs/development/libraries/volk/default.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, cppunit
|
||||
, python3
|
||||
, enableModTool ? true
|
||||
, removeReferencesTo
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "volk";
|
||||
version = "2.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gnuradio";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "fuHJ+p5VN4ThdbQFbzB08VCuy/Zo7m/I1Gs5EQGPeNY=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes a failing test: https://github.com/gnuradio/volk/pull/434
|
||||
(fetchpatch {
|
||||
url = "https://github.com/gnuradio/volk/pull/434/commits/bce8531b6f1a3c5abe946ed6674b283d54258281.patch";
|
||||
sha256 = "OLW9uF6iL47z63kjvYqwsWtkINav8Xhs+Htqg6Kr4uI=";
|
||||
})
|
||||
];
|
||||
cmakeFlags = lib.optionals (!enableModTool) [ "-DENABLE_MODTOOL=OFF" ];
|
||||
postInstall = ''
|
||||
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc} $(readlink -f $out/lib/libvolk.so)
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
python3.pkgs.Mako
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://libvolk.org/";
|
||||
description = "The Vector Optimized Library of Kernels";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ doronbehar ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
|
@ -240,16 +240,24 @@ mapAliases ({
|
|||
gnome_doc_utils = gnome-doc-utils; # added 2018-02-25
|
||||
gnome_themes_standard = gnome-themes-standard; # added 2018-02-25
|
||||
gnunet_git = throw "gnunet_git was removed due to gnunet becoming stable"; # added 2019-05-27
|
||||
gnuradio-nacl = gr-nacl; # added 2019-05-27
|
||||
gnuradio-gsm = gr-gsm; # added 2019-05-27
|
||||
gnuradio-ais = gr-ais; # added 2019-05-27
|
||||
gnuradio-limesdr = gr-limesdr; # added 2019-05-27
|
||||
gnuradio-rds = gr-rds; # added 2019-05-27
|
||||
gnuradio-osmosdr = gr-osmosdr; # added 2019-05-27
|
||||
# added 20-10-2020
|
||||
# Added 2020-10-16
|
||||
gnuradio-with-packages = gnuradio3_7.override {
|
||||
extraPackages = [ gr-nacl gr-gsm gr-ais gr-limesdr gr-rds gr-osmosdr ];
|
||||
extraPackages = lib.attrVals [
|
||||
"osmosdr" "ais" "gsm" "nacl" "rds" "limesdr"
|
||||
] gnuradio3_7Packages;
|
||||
};
|
||||
gnuradio-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16
|
||||
gnuradio-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16
|
||||
gnuradio-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16
|
||||
gnuradio-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16
|
||||
gnuradio-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16
|
||||
gnuradio-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16
|
||||
gr-nacl = gnuradio3_7.pkgs.nacl; # added 2019-05-27, changed 2020-10-16
|
||||
gr-gsm = gnuradio3_7.pkgs.gsm; # added 2019-05-27, changed 2020-10-16
|
||||
gr-ais = gnuradio3_7.pkgs.ais; # added 2019-05-27, changed 2020-10-16
|
||||
gr-limesdr = gnuradio3_7.pkgs.limesdr; # added 2019-05-27, changed 2020-10-16
|
||||
gr-rds = gnuradio3_7.pkgs.rds; # added 2019-05-27, changed 2020-10-16
|
||||
gr-osmosdr = gnuradio3_7.pkgs.osmosdr; # added 2019-05-27, changed 2020-10-16
|
||||
gnustep-make = gnustep.make; # added 2016-7-6
|
||||
gnupg20 = throw "gnupg20 has been removed from nixpkgs as upstream dropped support on 2017-12-31";# added 2020-07-12
|
||||
gnuvd = throw "gnuvd was removed because the backend service is missing"; # added 2020-01-14
|
||||
|
|
|
@ -3957,6 +3957,8 @@ in
|
|||
|
||||
volctl = callPackage ../tools/audio/volctl { };
|
||||
|
||||
volk = callPackage ../development/libraries/volk { };
|
||||
|
||||
vorta = libsForQt5.callPackage ../applications/backup/vorta { };
|
||||
|
||||
utahfs = callPackage ../applications/networking/utahfs { };
|
||||
|
@ -13145,7 +13147,10 @@ in
|
|||
|
||||
uefi-firmware-parser = callPackage ../development/tools/analysis/uefi-firmware-parser { };
|
||||
|
||||
uhd = callPackage ../applications/radio/uhd { };
|
||||
uhd3_5 = callPackage ../applications/radio/uhd/3.5.nix { };
|
||||
uhd = callPackage ../applications/radio/uhd {
|
||||
boost = boost17x;
|
||||
};
|
||||
|
||||
uisp = callPackage ../development/tools/misc/uisp { };
|
||||
|
||||
|
@ -16779,13 +16784,7 @@ in
|
|||
|
||||
qm-dsp = callPackage ../development/libraries/audio/qm-dsp { };
|
||||
|
||||
qradiolink = callPackage ../applications/radio/qradiolink {
|
||||
# 3.8 support is not ready yet:
|
||||
# https://github.com/qradiolink/qradiolink/issues/67#issuecomment-703222573
|
||||
# The non minimal build is used because the 'qtgui' component is needed.
|
||||
# gr-osmosdr is using the same gnuradio as of now.
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
qradiolink = callPackage ../applications/radio/qradiolink { };
|
||||
|
||||
qrupdate = callPackage ../development/libraries/qrupdate { };
|
||||
|
||||
|
@ -22339,81 +22338,97 @@ in
|
|||
|
||||
gksu = callPackage ../applications/misc/gksu { };
|
||||
|
||||
gnss-sdr = callPackage ../applications/radio/gnss-sdr {
|
||||
boost = boost166;
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
gnss-sdr = callPackage ../applications/radio/gnss-sdr { };
|
||||
|
||||
gnuradio-unwrapped = callPackage ../applications/radio/gnuradio {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python3;
|
||||
};
|
||||
# A build without gui components and other utilites not needed for end user
|
||||
# libraries
|
||||
gnuradioMinimal = gnuradio-unwrapped.override {
|
||||
features = {
|
||||
gnuradio-companion = false;
|
||||
python-support = false;
|
||||
gr-ctrlport = false;
|
||||
examples = false;
|
||||
gr-qtgui = false;
|
||||
gr-utils = false;
|
||||
gr-modtool = false;
|
||||
sphinx = false;
|
||||
doxygen = false;
|
||||
gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = callPackage ../applications/radio/gnuradio {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python3;
|
||||
boost = boost17x;
|
||||
};
|
||||
};
|
||||
gnuradio = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = gnuradio-unwrapped;
|
||||
gnuradioPackages = lib.recurseIntoAttrs gnuradio.pkgs;
|
||||
# A build without gui components and other utilites not needed for end user
|
||||
# libraries
|
||||
gnuradioMinimal = gnuradio.override {
|
||||
wrap = false;
|
||||
unwrapped = gnuradio.unwrapped.override {
|
||||
volk = volk.override {
|
||||
# So it will not reference python
|
||||
enableModTool = false;
|
||||
};
|
||||
features = {
|
||||
gnuradio-companion = false;
|
||||
python-support = false;
|
||||
examples = false;
|
||||
gr-qtgui = false;
|
||||
gr-utils = false;
|
||||
gr-modtool = false;
|
||||
gr-blocktool = false;
|
||||
sphinx = false;
|
||||
doxygen = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
gnuradio3_7-unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python2;
|
||||
gnuradio3_8 = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = callPackage ../applications/radio/gnuradio/3.8.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python3;
|
||||
boost = boost17x;
|
||||
};
|
||||
};
|
||||
gnuradio3_8Packages = lib.recurseIntoAttrs gnuradio3_8.pkgs;
|
||||
# A build without gui components and other utilites not needed if gnuradio is
|
||||
# used as a c++ library.
|
||||
gnuradio3_7Minimal = gnuradio3_7-unwrapped.override {
|
||||
features = {
|
||||
gnuradio-companion = false;
|
||||
python-support = false;
|
||||
gr-ctrlport = false;
|
||||
gr-qtgui = false;
|
||||
gr-utils = false;
|
||||
sphinx = false;
|
||||
doxygen = false;
|
||||
gr-wxgui = false;
|
||||
gnuradio3_8Minimal = gnuradio3_8.override {
|
||||
wrap = false;
|
||||
unwrapped = gnuradio3_8.unwrapped.override {
|
||||
volk = volk.override {
|
||||
enableModTool = false;
|
||||
};
|
||||
features = {
|
||||
gnuradio-companion = false;
|
||||
python-support = false;
|
||||
examples = false;
|
||||
gr-qtgui = false;
|
||||
gr-utils = false;
|
||||
gr-modtool = false;
|
||||
sphinx = false;
|
||||
doxygen = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
gnuradio3_7 = callPackage ../applications/radio/gnuradio/wrapper.nix {
|
||||
unwrapped = gnuradio3_7-unwrapped;
|
||||
unwrapped = callPackage ../applications/radio/gnuradio/3.7.nix {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreAudio;
|
||||
python = python2;
|
||||
# Incompatible with uhd4+
|
||||
uhd = uhd3_5;
|
||||
};
|
||||
};
|
||||
gnuradio3_7Packages = lib.recurseIntoAttrs gnuradio3_7.pkgs;
|
||||
# A build without gui components and other utilites not needed if gnuradio is
|
||||
# used as a c++ library.
|
||||
gnuradio3_7Minimal = gnuradio3_7.override {
|
||||
wrap = false;
|
||||
unwrapped = gnuradio3_7.unwrapped.override {
|
||||
volk = volk.override {
|
||||
enableModTool = false;
|
||||
};
|
||||
features = {
|
||||
gnuradio-companion = false;
|
||||
python-support = false;
|
||||
gr-qtgui = false;
|
||||
gr-utils = false;
|
||||
sphinx = false;
|
||||
doxygen = false;
|
||||
gr-wxgui = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
grandorgue = callPackage ../applications/audio/grandorgue { };
|
||||
|
||||
gr-nacl = callPackage ../applications/radio/gnuradio/nacl.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
gr-gsm = callPackage ../applications/radio/gnuradio/gsm.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
gr-ais = callPackage ../applications/radio/gnuradio/ais.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
gr-limesdr = callPackage ../applications/radio/gnuradio/limesdr.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
gr-rds = callPackage ../applications/radio/gnuradio/rds.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
gr-osmosdr = callPackage ../applications/radio/gnuradio/osmosdr.nix {
|
||||
gnuradio = gnuradio3_7-unwrapped;
|
||||
};
|
||||
|
||||
goldendict = libsForQt5.callPackage ../applications/misc/goldendict {
|
||||
inherit (darwin) libiconv;
|
||||
};
|
||||
|
@ -22440,14 +22455,7 @@ in
|
|||
|
||||
gpx = callPackage ../applications/misc/gpx { };
|
||||
|
||||
gqrx = libsForQt514.callPackage ../applications/radio/gqrx {
|
||||
gnuradio = gnuradio3_7Minimal;
|
||||
# Use the same gnuradio for gr-osmosdr as well
|
||||
gr-osmosdr = gr-osmosdr.override {
|
||||
gnuradio = gnuradio3_7Minimal;
|
||||
pythonSupport = false;
|
||||
};
|
||||
};
|
||||
gqrx = callPackage ../applications/radio/gqrx { };
|
||||
|
||||
gpx-viewer = callPackage ../applications/misc/gpx-viewer { };
|
||||
|
||||
|
@ -23295,9 +23303,7 @@ in
|
|||
|
||||
inkscape-extensions = recurseIntoAttrs (callPackages ../applications/graphics/inkscape/extensions.nix {});
|
||||
|
||||
inspectrum = libsForQt514.callPackage ../applications/radio/inspectrum {
|
||||
gnuradio = gnuradioMinimal;
|
||||
};
|
||||
inspectrum = callPackage ../applications/radio/inspectrum { };
|
||||
|
||||
ion3 = callPackage ../applications/window-managers/ion-3 {
|
||||
lua = lua5_1;
|
||||
|
|
47
pkgs/top-level/gnuradio-packages.nix
Normal file
47
pkgs/top-level/gnuradio-packages.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, newScope
|
||||
, gnuradio # unwrapped gnuradio
|
||||
}:
|
||||
|
||||
lib.makeScope newScope ( self:
|
||||
|
||||
let
|
||||
# Modeled after qt's
|
||||
mkDerivationWith = import ../development/gnuradio-modules/mkDerivation.nix {
|
||||
inherit lib;
|
||||
unwrapped = gnuradio;
|
||||
};
|
||||
mkDerivation = mkDerivationWith stdenv.mkDerivation;
|
||||
|
||||
callPackage = self.newScope {
|
||||
inherit (gnuradio)
|
||||
# Packages that are potentially overriden and used as deps here.
|
||||
boost
|
||||
uhd
|
||||
volk
|
||||
;
|
||||
inherit mkDerivationWith mkDerivation;
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
inherit callPackage mkDerivation mkDerivationWith;
|
||||
|
||||
### Packages
|
||||
|
||||
inherit gnuradio;
|
||||
|
||||
osmosdr = callPackage ../development/gnuradio-modules/osmosdr/default.nix { };
|
||||
|
||||
ais = callPackage ../development/gnuradio-modules/ais/default.nix { };
|
||||
|
||||
gsm = callPackage ../development/gnuradio-modules/gsm/default.nix { };
|
||||
|
||||
nacl = callPackage ../development/gnuradio-modules/nacl/default.nix { };
|
||||
|
||||
rds = callPackage ../development/gnuradio-modules/rds/default.nix { };
|
||||
|
||||
limesdr = callPackage ../development/gnuradio-modules/limesdr/default.nix { };
|
||||
|
||||
})
|
Loading…
Reference in a new issue