about summary refs log tree commit diff
path: root/pkgs/applications/misc/gnuradio/rds.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/gnuradio/rds.nix')
-rw-r--r--pkgs/applications/misc/gnuradio/rds.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/applications/misc/gnuradio/rds.nix b/pkgs/applications/misc/gnuradio/rds.nix
new file mode 100644
index 000000000000..44ed89d9002d
--- /dev/null
+++ b/pkgs/applications/misc/gnuradio/rds.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, cmake, pkgconfig, boost, gnuradio
+, makeWrapper, pythonSupport ? true, python, swig
+}:
+
+assert pythonSupport -> python != null && swig != null;
+
+stdenv.mkDerivation rec {
+  name = "gnuradio-rds-${version}";
+  version = "2016-08-27";
+
+  src = fetchFromGitHub {
+    owner = "bastibl";
+    repo = "gr-rds";
+    rev = "5246b75180808d47f321cb26f6c16d7c7a7af4fc";
+    sha256 = "008284ya464q4h4fd0zvcn6g7bym231p8fl3kdxncz9ks4zsbsxs";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    cmake boost gnuradio makeWrapper
+  ] ++ stdenv.lib.optionals pythonSupport [ python swig ];
+
+  postInstall = ''
+    for prog in "$out"/bin/*; do
+        wrapProgram "$prog" --set PYTHONPATH $PYTHONPATH:$(toPythonPath "$out")
+    done
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Gnuradio block for radio data system";
+    homepage = https://github.com/bastibl/gr-rds;
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux ++ platforms.darwin;
+    maintainers = with maintainers; [ mog ];
+  };
+}