2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, log4cpp
|
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;
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "gr-gsm";
|
2016-08-26 17:57:14 +02:00
|
|
|
version = "2016-08-25";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ptrkrysik";
|
|
|
|
repo = "gr-gsm";
|
|
|
|
rev = "3ca05e6914ef29eb536da5dbec323701fbc2050d";
|
|
|
|
sha256 = "13nnq927kpf91iqccr8db9ripy5czjl5jiyivizn6bia0bam2pvx";
|
|
|
|
};
|
|
|
|
|
2020-12-31 08:48:55 +01:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2016-08-26 17:57:14 +02:00
|
|
|
buildInputs = [
|
2020-12-31 08:48:55 +01:00
|
|
|
boost gnuradio makeWrapper cppunit libosmocore gr-osmosdr log4cpp
|
2021-01-15 06:42:41 +01:00
|
|
|
] ++ lib.optionals pythonSupport [ python swig ];
|
2016-08-26 17:57:14 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-08-26 17:57:14 +02:00
|
|
|
description = "Gnuradio block for gsm";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ptrkrysik/gr-gsm";
|
2016-08-26 17:57:14 +02:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|