2015-11-04 15:42:01 +01:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio, uhd
|
|
|
|
, makeWrapper, libsodium, cppunit
|
|
|
|
, 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-nacl";
|
2018-09-22 19:56:48 +02:00
|
|
|
version = "2017-04-10";
|
2015-11-04 15:42:01 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "stwunsch";
|
|
|
|
repo = "gr-nacl";
|
2018-09-22 19:56:48 +02:00
|
|
|
rev = "15276bb0fcabf5fe4de4e58df3d579b5be0e9765";
|
|
|
|
sha256 = "018np0qlk61l7mlv3xxx5cj1rax8f1vqrsrch3higsl25yydbv7v";
|
2015-11-04 15:42:01 +01:00
|
|
|
};
|
|
|
|
|
2017-09-14 21:24:37 +02:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2015-11-04 15:42:01 +01:00
|
|
|
buildInputs = [
|
2017-09-14 21:24:37 +02:00
|
|
|
cmake boost gnuradio uhd makeWrapper libsodium cppunit
|
2015-11-04 15:42:01 +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 02:27:30 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-11-04 15:42:01 +01:00
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Gnuradio block for encryption";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/stwunsch/gr-nacl";
|
2015-11-04 15:42:01 +01:00
|
|
|
license = licenses.gpl3Plus;
|
2017-07-15 02:26:42 +02:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2015-11-04 15:42:01 +01:00
|
|
|
maintainers = with maintainers; [ mog ];
|
|
|
|
};
|
|
|
|
}
|