nonguix: Add support for libraries for an extension other than ".so".

* nonguix/build-system/binary.scm (binary-build): Don't fail when setting the
  interpreter of libraries that don't contain ".so" in their name.
This commit is contained in:
Pierre Neidhardt 2020-01-16 17:45:53 +01:00
parent 7007b3d0f2
commit aeaa8a02f5

View file

@ -82,7 +82,9 @@ Both executables and dynamic libraries are accepted.
The inputs are optional when the file is an executable." The inputs are optional when the file is an executable."
(define (binary-patch binary interpreter runpath) (define (binary-patch binary interpreter runpath)
(unless (string-contains binary ".so") (unless (string-contains binary ".so")
(invoke "patchelf" "--set-interpreter" interpreter binary)) ;; Use `system*' and not `invoke' since this may raise an error if
;; library does not end with .so.
(system* "patchelf" "--set-interpreter" interpreter binary))
(when runpath (when runpath
(let ((rpath (string-join (let ((rpath (string-join
(map (map