From f761f0698872193afe9e2fbf6bedc66c05f79875 Mon Sep 17 00:00:00 2001 From: Matthew O'Gorman Date: Wed, 4 Nov 2015 08:42:01 -0600 Subject: [PATCH] gnuradio-nacl: init at 2015-11-05 --- lib/maintainers.nix | 1 + .../misc/gnuradio-nacl/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 pkgs/applications/misc/gnuradio-nacl/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 1c55d2e2de83..9478752d2294 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -192,6 +192,7 @@ mirdhyn = "Merlin Gaillard "; mschristiansen = "Mikkel Christiansen "; modulistic = "Pablo Costa "; + mog = "Matthew O'Gorman "; mornfall = "Petr Ročkai "; MP2E = "Cray Elliott "; msackman = "Matthew Sackman "; diff --git a/pkgs/applications/misc/gnuradio-nacl/default.nix b/pkgs/applications/misc/gnuradio-nacl/default.nix new file mode 100644 index 000000000000..6298e083617f --- /dev/null +++ b/pkgs/applications/misc/gnuradio-nacl/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio, uhd +, makeWrapper, libsodium, cppunit +, pythonSupport ? true, python, swig +}: + +assert pythonSupport -> python != null && swig != null; + +stdenv.mkDerivation rec { + name = "gnuradio-nacl-${version}"; + version = "2015-11-05"; + + src = fetchFromGitHub { + owner = "stwunsch"; + repo = "gr-nacl"; + rev = "d6dd3c02dcda3f601979908b61b1595476f6bf95"; + sha256 = "0q28lgkndcw9921hm6cw5ilxd83n65hjajwl78j50mh6yc3bim35"; + }; + + buildInputs = [ + cmake pkgconfig boost gnuradio uhd makeWrapper libsodium cppunit + ] ++ stdenv.lib.optionals pythonSupport [ python swig ]; + + postInstall = '' + for prog in "$out"/bin/*; do + wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out") + done + ''; + + meta = with stdenv.lib; { + description = "Gnuradio block for encryption"; + homepage = https://github.com/stwunsch/gr-nacl; + license = licenses.gpl3Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ mog ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b367f5ed199..179550afb962 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11520,9 +11520,11 @@ let }; gnuradio-with-packages = callPackage ../applications/misc/gnuradio/wrapper.nix { - extraPackages = [ gnuradio-osmosdr ]; + extraPackages = [ gnuradio-nacl gnuradio-osmosdr ]; }; + gnuradio-nacl = callPackage ../applications/misc/gnuradio-nacl { }; + gnuradio-osmosdr = callPackage ../applications/misc/gnuradio-osmosdr { }; goldendict = callPackage ../applications/misc/goldendict { };