about summary refs log tree commit diff
path: root/pkgs/applications/misc/gnuradio-nacl/default.nix
blob: 6298e083617f7443e5cb1e1441405fa92cc60e75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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 ];
  };
}