about summary refs log tree commit diff
path: root/pkgs/development/gnuradio-modules/rds
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2020-10-16 23:31:20 +0300
committerDoron Behar <doron.behar@gmail.com>2021-03-13 12:46:59 +0200
commit2d08e55e9b8f96cf00466bd55fe0d132f1abd008 (patch)
tree1be9003486550aea9f8d92e6bf14eb3ca54af7df /pkgs/development/gnuradio-modules/rds
parent7690f9a312e49e56b6df443169e5bf2ea420e0a7 (diff)
gnuradio.pkgs: init
- Write a `mkDerivation` and `mkDerivationWith` function for gnuradio,
  like qt5.
- qradiolink, gqrx: Use gnuradio's callPackage and mkDerivation.
- Use gnuradio.callPackage to define all gnuradio.pkgs.
- Move all gnuradio packages expressions to pkgs/development/gnuradio-modules/ -
  modeled after Python's.
- Add more paths to gnuradio's wrapper - add the extra packages as
  python modules, and add their executables with proper env vars
  wrapping.

Co-authored-by: Frederik Rietdijk <fridh@fridh.nl>
Diffstat (limited to 'pkgs/development/gnuradio-modules/rds')
-rw-r--r--pkgs/development/gnuradio-modules/rds/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/development/gnuradio-modules/rds/default.nix b/pkgs/development/gnuradio-modules/rds/default.nix
new file mode 100644
index 0000000000000..a2062783bd74e
--- /dev/null
+++ b/pkgs/development/gnuradio-modules/rds/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, mkDerivation
+, fetchFromGitHub
+, gnuradio
+, cmake
+, pkg-config
+, swig
+, python
+, log4cpp
+, mpir
+, boost
+, gmp
+, icu
+}:
+
+let
+  version = {
+    "3.7" = "1.1.0";
+    "3.8" = "3.8.0";
+  }.${gnuradio.versionAttr.major};
+  src = fetchFromGitHub {
+    owner = "bastibl";
+    repo = "gr-rds";
+    rev = "v${version}";
+    sha256 = {
+      "3.7" = "0jkzchvw0ivcxsjhi1h0mf7k13araxf5m4wi5v9xdgqxvipjzqfy";
+      "3.8" = "+yKLJu2bo7I2jkAiOdjvdhZwxFz9NFgTmzcLthH9Y5o=";
+    }.${gnuradio.versionAttr.major};
+  };
+in mkDerivation {
+  pname = "gr-rds";
+  inherit version src;
+  disabledForGRafter = "3.9";
+
+  buildInputs = [
+    log4cpp
+    mpir
+    boost
+    gmp
+    icu
+  ];
+
+  nativeBuildInputs = [
+    cmake
+    pkg-config
+    swig
+    python
+  ];
+
+  meta = with lib; {
+    description = "Gnuradio block for radio data system";
+    homepage = "https://github.com/bastibl/gr-rds";
+    license = licenses.gpl2Plus;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ mog ];
+  };
+}