projects/guix·blob javascript-team · refs

89 lines · 3.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2013, 2014 Ludovic Courtès <[email protected]>
3;;; Copyright © 2015 Mark H Weaver <[email protected]>
4;;; Copyright © 2019 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2022 Efraim Flashner <[email protected]>
6;;; Copyright © 2022 Marius Bakke <[email protected]>
7;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
8;;;
9;;; This file is part of GNU Guix.
10;;;
11;;; GNU Guix is free software; you can redistribute it and/or modify it
12;;; under the terms of the GNU General Public License as published by
13;;; the Free Software Foundation; either version 3 of the License, or (at
14;;; your option) any later version.
15;;;
16;;; GNU Guix is distributed in the hope that it will be useful, but
17;;; WITHOUT ANY WARRANTY; without even the implied warranty of
18;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;;; GNU General Public License for more details.
20;;;
21;;; You should have received a copy of the GNU General Public License
22;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
23
24(define-module (gnu packages libunwind)
25 #:use-module (guix gexp)
26 #:use-module (guix download)
27 #:use-module (guix packages)
28 #:use-module (guix utils)
29 #:use-module (gnu packages)
30 #:use-module (guix build-system gnu)
31 #:use-module (guix build-system trivial)
32 #:use-module (guix licenses))
33
34(define-public libunwind
35 (package
36 (name "libunwind")
37 (version "1.6.2")
38 (source (origin
39 (method url-fetch)
40 (uri (string-append "mirror://savannah/libunwind/libunwind-"
41 version ".tar.gz"))
42 (sha256
43 (base32
44 "0xj9g6a9q7v7zz6lymf3f6011synibgawi4wi384bywid5kfqsja"))))
45 (build-system gnu-build-system)
46 (arguments
47 (list
48 #:configure-flags
49 #~(list #$(string-append
50 "CFLAGS=-g -O2"
51 " -Wno-error=implicit-function-declaration"
52 " -Wno-error=incompatible-pointer-types"))
53 ;; Two tests are failing with newer toolchains:
54 ;; https://github.com/libunwind/libunwind/issues/363
55 #:make-flags
56 #~(list "XFAIL_TESTS=run-coredump-unwind run-coredump-unwind-mdi")
57 ;; A different collection of tests fails for each architecture.
58 #:tests? (and (not (%current-target-system))
59 (target-x86-64?))))
60 (home-page "https://www.nongnu.org/libunwind")
61 (synopsis "Determining the call chain of a program")
62 (description
63 "The primary goal of this project is to define a portable and efficient C
64programming interface (API) to determine the call-chain of a program. The API
65additionally provides the means to manipulate the preserved (callee-saved)
66state of each call-frame and to resume execution at any point in the
67call-chain (non-local goto). The API supports both local (same-process) and
68remote (across-process) operation. As such, the API is useful in a number of
69applications.")
70 ;; Do not believe <https://savannah.nongnu.org/projects/libunwind/>:
71 ;; see <https://github.com/libunwind/libunwind/issues/372>.
72 (license expat)))
73
74(define-public libunwind-static
75 (package
76 (inherit libunwind)
77 (name (string-append (package-name libunwind) "-static"))
78 (build-system trivial-build-system)
79 (arguments
80 (list
81 #:modules '((guix build utils))
82 #:builder
83 #~(begin
84 (use-modules (guix build utils))
85 (let ((target (string-append #$output "/lib/libunwind.a")))
86 (install-file (search-input-file %build-inputs "/lib/libunwind.a")
87 (dirname target))
88 (remove-store-references target)))))
89 (inputs (list libunwind))))