2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
|
2019-05-27 13:26:31 +01:00
|
|
|
, makeWrapper, cppunit, libosmocore, gr-osmosdr
|
2016-08-26 16:57:14 +01:00
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
2019-08-13 22:52:01 +01:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "gr-gsm";
|
2016-08-26 16:57:14 +01:00
|
|
|
version = "2016-08-25";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ptrkrysik";
|
|
|
|
repo = "gr-gsm";
|
|
|
|
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
|
|
|
|
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
|
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2016-08-26 16:57:14 +01:00
|
|
|
buildInputs = [
|
2020-12-31 07:48:55 +00:00
|
|
|
boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp
|
2016-08-26 16:57:14 +01:00
|
|
|
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
2019-05-27 13:26:31 +01:00
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out")
|
2016-08-26 16:57:14 +01:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-08-26 16:57:14 +01:00
|
|
|
description = "Gnuradio block for gsm";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ptrkrysik/gr-gsm";
|
2016-08-26 16:57:14 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2018-12-08 18:37:48 +00:00
|
|
|
platforms = platforms.linux;
|
2016-08-26 16:57:14 +01:00
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|