guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#47181] Packaging python-soundfile for use in MediaGoblin


From: Nicolò Balzarotti
Subject: [bug#47181] Packaging python-soundfile for use in MediaGoblin
Date: Tue, 16 Mar 2021 08:51:10 +0100

Ben Sturmfels via Guix-patches via <guix-patches@gnu.org> writes:

> Hi folks,
>
Hi,
>
>   OSError: cannot load library 'libsndfile.so.1': libsndfile.so.1:
>   cannot open shared object file: No such file or directory
>
You can patch the sounfile.py file, setting the correct library path.

Many other python packages do this, like python-file, python-libarchive-c, 
python-pyzbar

It should look something like (untested):

#+begin_src scheme
(arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'build 'set-library-file-name
           (lambda* (#:key inputs #:allow-other-keys)
             (let ((libsndfile (assoc-ref inputs "libsndfile")))
               (substitute* "soundfile.py"
                 (("find_library\\('sndfile'\\)")
                  (string-append "'" libsndfile "/lib/libsndfile.so.0'")))
               #t))))))
#+end_src

Nicolò





reply via email to

[Prev in Thread] Current Thread [Next in Thread]