2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, boost, gnuradio, uhd
|
2020-12-07 07:45:13 +00:00
|
|
|
, makeWrapper, libsodium, cppunit, log4cpp
|
2020-04-24 23:36:52 +00:00
|
|
|
, pythonSupport ? true, python, swig
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert pythonSupport -> python != null && swig != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "gr-nacl";
|
|
|
|
version = "2017-04-10";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stwunsch";
|
|
|
|
repo = "gr-nacl";
|
|
|
|
rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765";
|
|
|
|
sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v";
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
2021-01-15 22:18:51 +00:00
|
|
|
boost gnuradio uhd makeWrapper libsodium cppunit log4cpp
|
|
|
|
] ++ lib.optionals pythonSupport [ python swig ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in "$out"/bin/*; do
|
|
|
|
wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Gnuradio block for encryption";
|
|
|
|
homepage = "https://github.com/stwunsch/gr-nacl";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|