summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorGuillaume Le Vaillant <glv@posteo.net>2021-05-03 15:01:48 +0200
committerGuillaume Le Vaillant <glv@posteo.net>2021-05-07 18:16:59 +0200
commit86a6749fbb0f3235fb5ee975d2288997aecd8409 (patch)
treeeb6ce4dd13e08105176c86146a1c67c5c2a14eb1 /gnu
parent71e95229043627c01cd2b34e7de58053053e9253 (diff)
downloadguix-86a6749fbb0f3235fb5ee975d2288997aecd8409.tar.gz
gnu: Add csdr.
* gnu/packages/radio.scm (csdr): New variable.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/radio.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index e6d5ef0203..5329a75794 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -1575,3 +1575,58 @@ receiver.")
      "@code{welle.io} is a Digital Audio Broadcasting (DAB and DAB+) software
 defined radio with support for rtl-sdr.")
     (license license:gpl2+)))
+
+(define-public csdr
+  ;; No release since 2017, use commit directly.
+  (let ((commit "6ef2a74206887155290a54c7117636f66742f858")
+        (revision "1"))
+    (package
+      (name "csdr")
+      (version (git-version "0.15" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/ha7ilm/csdr")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0ic35130lf66lk3wawgc5bcg711l7chv9al1hzdc1xrmq9qf9hri"))))
+      (build-system gnu-build-system)
+      (inputs
+       `(("fftwf" ,fftwf)))
+      (arguments
+       `(#:make-flags
+         (list (string-append "PREFIX=" (assoc-ref %outputs "out"))
+               ;; Don't print summary of SIMD optimized functions.
+               "PARSEVECT=no")
+         #:tests? #f  ; No check phase
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'configure
+             (lambda* (#:key outputs #:allow-other-keys)
+               (substitute* "Makefile"
+                 (("PARAMS_MISC = -Wno-unused-result" all)
+                  ;; The 'validate-runpath' phase fails without this.
+                  (string-append
+                   all " -Wl,-rpath=" (assoc-ref outputs "out") "/lib"))
+                 (("PARAMS_SIMD =.*")
+                  ;; Disable to make reproducibility and cross-compilation work.
+                  "")
+                 (("gcc ")
+                  ,(string-append (cc-for-target) " "))
+                 (("g\\+\\+ ")
+                  ,(string-append (cxx-for-target) " ")))))
+           (add-before 'install 'make-installation-directories
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (mkdir-p (string-append out "/bin"))
+                 (mkdir-p (string-append out "/lib"))))))))
+      (home-page "https://github.com/ha7ilm/csdr")
+      (synopsis "DSP for software defined radio")
+      (description
+       "This package includes the @code{libcsdr} library of
+@acronym{DSP, Digital Signal Processing} functions for
+@acronym{SDRs, Software Defined Radios}, and the @code{csdr} command line
+program that can be used to build simple signal processing flow graphs.")
+      (license license:gpl3+))))