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