2016-08-26 17:57:14 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio
|
2019-05-27 14:26:31 +02:00
|
|
|
, makeWrapper, cppunit, libosmocore, gr-osmosdr
|
2016-08-26 17:57:14 +02:00
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-05-27 14:26:31 +02:00
|
|
|
name = "gr-gsm-${version}";
|
2016-08-26 17:57:14 +02:00
|
|
|
version = "2016-08-25";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ptrkrysik";
|
|
|
|
repo = "gr-gsm";
|
|
|
|
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
|
|
|
|
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
|
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-08-26 17:57:14 +02:00
|
|
|
buildInputs = [
|
2019-05-27 14:26:31 +02:00
|
|
|
cmake boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr
|
2016-08-26 17:57:14 +02:00
|
|
|
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
2019-05-27 14:26:31 +02:00
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:${gr-osmosdr}/lib/${python.libPrefix}/site-packages:$(toPythonPath "$out")
|
2016-08-26 17:57:14 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-07-15 02:27:30 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-08-26 17:57:14 +02:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for gsm";
|
|
|
|
homepage = https://github.com/ptrkrysik/gr-gsm;
|
|
|
|
license = licenses.gpl3Plus;
|
2018-12-08 19:37:48 +01:00
|
|
|
platforms = platforms.linux;
|
2016-08-26 17:57:14 +02:00
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|