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