2016-08-26 16:57:14 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio
|
|
|
|
, makeWrapper, cppunit, gnuradio-osmosdr
|
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "gnuradio-ais-${version}";
|
2017-07-15 01:01:49 +01:00
|
|
|
version = "2015-12-20";
|
2016-08-26 16:57:14 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bistromath";
|
|
|
|
repo = "gr-ais";
|
2017-07-15 01:01:49 +01:00
|
|
|
# Upstream PR: https://github.com/bistromath/gr-ais/commit/8502d0252a2a1a9b8d1a71795eaeb5d820684054
|
|
|
|
"rev" = "8502d0252a2a1a9b8d1a71795eaeb5d820684054";
|
|
|
|
"sha256" = "1b9j0kc74cw12a7jv4lii77dgzqzg2s8ndzp4xmisxksgva1qfvh";
|
2016-08-26 16:57:14 +01:00
|
|
|
};
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2016-08-26 16:57:14 +01:00
|
|
|
buildInputs = [
|
2017-09-14 20:24:37 +01:00
|
|
|
cmake boost gnuradio makeWrapper cppunit gnuradio-osmosdr
|
2016-08-26 16:57:14 +01:00
|
|
|
] ++ stdenv.lib.optionals pythonSupport [ python swig ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2017-07-15 01:27:30 +01:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2016-08-26 16:57:14 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for ais";
|
|
|
|
homepage = https://github.com/bistromath/gr-ais;
|
|
|
|
license = licenses.gpl3Plus;
|
2017-07-15 01:26:42 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2016-08-26 16:57:14 +01:00
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|