gnuradio.pkgs: init
- Write a `mkDerivation` and `mkDerivationWith` function for gnuradio, like qt5. - qradiolink, gqrx: Use gnuradio's callPackage and mkDerivation. - Use gnuradio.callPackage to define all gnuradio.pkgs. - Move all gnuradio packages expressions to pkgs/development/gnuradio-modules/ - modeled after Python's. - Add more paths to gnuradio's wrapper - add the extra packages as python modules, and add their executables with proper env vars wrapping. Co-authored-by: Frederik Rietdijk <fridh@fridh.nl>
This commit is contained in:
co-authored by
Frederik Rietdijk
parent
7690f9a312
commit
2d08e55e9b
@@ -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 ];
|
||||
};
|
||||
}
|
||||
@@ -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 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{ 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";
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchFromGitHub {
|
||||
owner = "myriadrf";
|
||||
repo = "gr-limesdr";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0ldqvfwl0gil89l9s31fjf9d7ki0dk572i8vna336igfaz348ypq";
|
||||
"3.8" = "ffs+8TU0yr6IW1xZJ/abQ1CQWGZM+zYqPRJxy3ZvM9U=";
|
||||
}.${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 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{ 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 itself by default
|
||||
buildInputs = (args.buildInputs or []) ++ [ unwrapped ];
|
||||
};
|
||||
in mkDerivation (args // args_)
|
||||
@@ -0,0 +1,46 @@
|
||||
{ lib
|
||||
, mkDerivation
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
, pkg-config
|
||||
, cppunit
|
||||
, swig
|
||||
, boost
|
||||
, log4cpp
|
||||
, python
|
||||
, libsodium
|
||||
}:
|
||||
|
||||
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
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
cppunit
|
||||
log4cpp
|
||||
boost
|
||||
libsodium
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Gnuradio block for encryption";
|
||||
homepage = "https://github.com/stwunsch/gr-nacl";
|
||||
license = licenses.gpl3Plus;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ mog ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
{ 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";
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchgit {
|
||||
url = "git://git.osmocom.org/gr-osmosdr";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0bf9bnc1c3c4yqqqgmg3nhygj6rcfmyk6pybi27f7461d2cw1drv";
|
||||
"3.8" = "HT6xlN6cJAnvF+s1g2I1uENhBJJizdADlLXeSD0rEqs=";
|
||||
}.${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;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
{ 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";
|
||||
}.${gnuradio.versionAttr.major};
|
||||
src = fetchFromGitHub {
|
||||
owner = "bastibl";
|
||||
repo = "gr-rds";
|
||||
rev = "v${version}";
|
||||
sha256 = {
|
||||
"3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
|
||||
"3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
|
||||
}.${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 ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user