From 66db4f5c5751afa7c3471079136c6be1ae1e947b Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sun, 29 Sep 2024 09:32:39 +0800 Subject: gnu: Add patchelf-0.16. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/elf.scm (patchelf-0.16): New variable. Change-Id: Ide4c547734156ffe909a6d010974a7450aaa45cd Signed-off-by: Ludovic Courtès --- gnu/packages/elf.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index dc2db83632..119f8d13dd 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -28,6 +28,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages elf) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) @@ -320,6 +321,32 @@ static analysis of the ELF binaries at hand.") changed.") (license gpl3+))) +;; Newer patchelf may break binaries. e.g. When setting RUNPATH for a Go +;; program. +;; See also: https://github.com/NixOS/patchelf/issues/482 +(define-public patchelf-0.16 + (package + (inherit patchelf) + (name "patchelf") + (version "0.16.1") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/NixOS/patchelf/releases/download/" + version + "/patchelf-" version ".tar.bz2")) + (sha256 + (base32 + "0zdby3gpmm8q4735pviaq92zj41i2rdnhwhyrsb3sinc9hzmz4db")))) + (arguments + (substitute-keyword-arguments (package-arguments patchelf) + ((#:phases phases '%standard-phases) + #~(modify-phases #$phases + (add-after 'fix-tests 'skip-empty-rpath-test + (lambda _ + (substitute* "tests/set-empty-rpath.sh" + (("^\\$\\{SCRATCH\\}\\/simple.$") "")))))))))) + (define-public libdwarf (package (name "libdwarf") -- cgit v1.2.3