2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio
|
2020-10-05 10:04:49 +01:00
|
|
|
, makeWrapper, cppunit, gr-osmosdr, log4cpp
|
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-ais";
|
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
|
2019-08-13 22:52:01 +01:00
|
|
|
rev = "8502d0252a2a1a9b8d1a71795eaeb5d820684054";
|
|
|
|
sha256 = "1b9j0kc74cw12a7jv4lii77dgzqzg2s8ndzp4xmisxksgva1qfvh";
|
2016-08-26 16:57:14 +01:00
|
|
|
};
|
|
|
|
|
2020-12-31 07:48:55 +00:00
|
|
|
nativeBuildInputs = [ cmake makeWrapper pkg-config ];
|
|
|
|
buildInputs = [ boost gnuradio cppunit gr-osmosdr log4cpp ]
|
2021-01-15 05:42:41 +00:00
|
|
|
++ lib.optionals pythonSupport [ python swig ];
|
2016-08-26 16:57:14 +01:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-08-26 16:57:14 +01:00
|
|
|
description = "Gnuradio block for ais";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/bistromath/gr-ais";
|
2016-08-26 16:57:14 +01:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|