~ruther/guix-exprs

4aef3e72981477f2521ac346d65f7d48c8210bf7 — Rutherther 5 months ago 4fe344d
fix: libiio python bindings
1 files changed, 15 insertions(+), 3 deletions(-)

M modules/ruther/packages/radio.scm
M modules/ruther/packages/radio.scm => modules/ruther/packages/radio.scm +15 -3
@@ 18,7 18,7 @@
(define-public libiio
  (package
    (name "libiio")
    (version "0.24")
    (version "0.26")
    (source
     (origin
       (method git-fetch)


@@ 27,7 27,7 @@
             (commit (string-append "v" version))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "136n22macjz70bgxd7ix77gkv7zhbk3zzl340kwwpmb94z2fr4bk"))))
        (base32 "18cmaszfmn6kaa9gi26kkgjk506xqb8zsd4bq6yp8hzxr1qldfly"))))
    (arguments
     (list
      #:tests? #f


@@ 37,7 37,19 @@
         "-DOSX_PACKAGE=off"
         "-DOSX_FRAMEWORK=off"
         (string-append "-DPython_EXECUTABLE=" (search-input-file %build-inputs "/bin/python3"))
         "-DPYTHON_BINDINGS=on")))
         "-DPYTHON_BINDINGS=on")
      #:phases
      #~(modify-phases %standard-phases
          (add-after 'unpack 'patch
            (lambda _
              (substitute* "bindings/python/iio.py"
                (("_iiolib = \"iio\"") (string-append "_iiolib = \"" #$output "/lib/libiio.so\""))
                (("find_library\\(_iiolib\\)") "_iiolib"))
              ;; Libiio is not installed at the time of the build. The check is unnecessary,
              ;; to do it the upstream way, we would have to configure, build, install
              ;; without the bindings first, and then second time with the bindings...
              (substitute* "bindings/python/setup.py.cmakein"
                (("self._check_libiio_installed()") "")))))))
    (native-inputs
     (list
      pkg-config