1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
3 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages elf)
21 #:use-module (guix packages)
22 #:use-module (guix download)
23 #:use-module (guix build-system gnu)
24 #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+))
25 #:use-module (gnu packages)
26 #:use-module (gnu packages m4)
27 #:use-module (gnu packages compression))
29 (define-public elfutils
36 "https://fedorahosted.org/releases/e/l/elfutils/"
37 version "/elfutils-" version ".tar.bz2"))
40 "11ffbihw9zs2dhmlww9zilwvmv6v1pr6bvnz5dnzn0lxq70ckbag"))))
41 (build-system gnu-build-system)
43 ;; Separate programs because that's usually not what elfutils users want,
44 ;; and because they duplicate what Binutils provides.
45 (outputs '("out" ; libelf.so, elfutils/*.h, etc.
46 "bin")) ; ld, nm, objdump, etc.
48 (native-inputs `(("m4" ,m4)))
49 (inputs `(("zlib" ,zlib)))
50 (home-page "https://fedorahosted.org/elfutils/")
51 (synopsis "Linker and ELF manipulation tools")
53 "This package provides command-line tools to manipulate binaries in the
54 Executable and Linkable Format (ELF). This includes ld, ar, objdump,
55 addr2line, and more.")
57 ;; Libraries are dual-licensed LGPLv3.0+ | GPLv2, and programs are GPLv3+.
66 (uri (string-append "http://www.mr511.de/software/libelf-"
70 "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"))))
71 (build-system gnu-build-system)
72 (arguments '(#:phases (alist-replace
74 (lambda* (#:key outputs #:allow-other-keys)
75 ;; This old `configure' script doesn't support
76 ;; variables passed as arguments.
77 (let ((out (assoc-ref outputs "out")))
78 (setenv "CONFIG_SHELL" (which "bash"))
80 (system* "./configure"
81 (string-append "--prefix=" out)))))
83 (home-page "http://www.mr511.de/software/english.html")
84 (synopsis "ELF object file access library")
85 (description "Libelf is a C library to access ELF object files.")
88 (define-public patchelf
95 "http://nixos.org/releases/patchelf/patchelf-"
97 "/patchelf-" version ".tar.bz2"))
100 "1rqpg84wrd3fa16wa9vqdvasnc05yz49w207cz1l0wrl4k8q97y9"))
101 (patches (list (search-patch "patchelf-page-size.patch")))))
102 (build-system gnu-build-system)
103 (home-page "http://nixos.org/patchelf.html")
104 (synopsis "Modify the dynamic linker and RPATH of ELF executables")
106 "PatchELF allows the ELF \"interpreter\" and RPATH of an ELF binary to be