summaryrefslogtreecommitdiff
path: root/guix/build-system
diff options
context:
space:
mode:
Diffstat (limited to 'guix/build-system')
-rw-r--r--guix/build-system/cmake.scm15
-rw-r--r--guix/build-system/copy.scm13
-rw-r--r--guix/build-system/dune.scm7
-rw-r--r--guix/build-system/font.scm30
-rw-r--r--guix/build-system/glib-or-gtk.scm20
-rw-r--r--guix/build-system/gnu.scm24
-rw-r--r--guix/build-system/maven.scm11
-rw-r--r--guix/build-system/meson.scm20
-rw-r--r--guix/build-system/mozilla.scm52
-rw-r--r--guix/build-system/ocaml.scm5
-rw-r--r--guix/build-system/qt.scm11
11 files changed, 124 insertions, 84 deletions
diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm
index 0aabc95b90..effb54f044 100644
--- a/guix/build-system/cmake.scm
+++ b/guix/build-system/cmake.scm
@@ -110,9 +110,8 @@
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '%standard-phases)
(system (%current-system))
(substitutable? #t)
@@ -150,8 +149,8 @@ provides a 'CMakeLists.txt' file as its build system."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories))))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
@@ -185,10 +184,8 @@ provides a 'CMakeLists.txt' file as its build system."
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '%standard-phases)
(substitutable? #t)
(system (%current-system))
diff --git a/guix/build-system/copy.scm b/guix/build-system/copy.scm
index 6efc2b2766..6cd3ec0216 100644
--- a/guix/build-system/copy.scm
+++ b/guix/build-system/copy.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
-;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2023 Jonathan Brielmaier <jonathan.brielmaier@web.de>
;;;
;;; This file is part of GNU Guix.
@@ -85,12 +85,12 @@
(install-plan ''(("." "./")))
(search-paths '())
(out-of-source? #t)
+ (tests? #t)
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '(@ (guix build copy-build-system)
%standard-phases))
(system (%current-system))
@@ -120,11 +120,12 @@
(sexp->gexp phases)
phases)
#:out-of-source? #$out-of-source?
+ #:tests? #$tests?
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories))))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/dune.scm b/guix/build-system/dune.scm
index 3f81d21441..dc280242fb 100644
--- a/guix/build-system/dune.scm
+++ b/guix/build-system/dune.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
-;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 pukkamustard <pukkamustard@posteo.net>
;;;
;;; This file is part of GNU Guix.
@@ -112,9 +112,8 @@
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags gnu:%strip-flags)
+ (strip-directories gnu:%strip-directories)
(phases '(@ (guix build dune-build-system)
%standard-phases))
(system (%current-system))
diff --git a/guix/build-system/font.scm b/guix/build-system/font.scm
index a99f76c66b..925933516c 100644
--- a/guix/build-system/font.scm
+++ b/guix/build-system/font.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2017, 2022 Arun Isaac <arunisaac@systemreboot.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -54,20 +54,20 @@
(bag
(name name)
(system system)
- (host-inputs `(,@(if source
- `(("source" ,source))
- '())
- ,@inputs
- ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
- ,@(let ((compression (resolve-interface '(gnu packages compression))))
- (map (match-lambda
- ((name package)
- (list name (module-ref compression package))))
- `(("gzip" gzip)
- ("bzip2" bzip2)
- ("unzip" unzip)
- ("xz" xz))))))
- (build-inputs native-inputs)
+ (host-inputs inputs)
+ (build-inputs `(,@(if source
+ `(("source" ,source))
+ '())
+ ,@native-inputs
+ ,(list "tar" (module-ref (resolve-interface '(gnu packages base)) 'tar))
+ ,@(let ((compression (resolve-interface '(gnu packages compression))))
+ (map (match-lambda
+ ((name package)
+ (list name (module-ref compression package))))
+ `(("gzip" gzip)
+ ("bzip2" bzip2)
+ ("unzip" unzip)
+ ("xz" xz))))))
(outputs outputs)
(build font-build)
(arguments (strip-keyword-arguments private-keywords arguments))))
diff --git a/guix/build-system/glib-or-gtk.scm b/guix/build-system/glib-or-gtk.scm
index aa9703829b..f4f431273b 100644
--- a/guix/build-system/glib-or-gtk.scm
+++ b/guix/build-system/glib-or-gtk.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013, 2014, 2015, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013-2015, 2019-2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
;;; Copyright © 2014 Federico Beffa <beffa@fbengineering.ch>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
@@ -139,9 +139,8 @@
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '(@ (guix build glib-or-gtk-build-system)
%standard-phases))
(glib-or-gtk-wrap-excluded-outputs ''())
@@ -179,9 +178,9 @@
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-flags #$strip-flags
#:strip-directories
- #$(sexp->gexp strip-directories))))))
+ #$strip-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
@@ -214,9 +213,8 @@
(make-dynamic-linker-cache? #f)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '(@ (guix build glib-or-gtk-build-system)
%standard-phases))
(glib-or-gtk-wrap-excluded-outputs ''())
@@ -273,9 +271,9 @@
#:make-dynamic-linker-cache? #$make-dynamic-linker-cache?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
+ #:strip-flags #$strip-flags
#:strip-directories
- #$(sexp->gexp strip-directories))))
+ #$strip-directories)))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index e62ee18367..bb7552084c 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +29,8 @@
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:export (%gnu-build-system-modules
+ %strip-flags
+ %strip-directories
gnu-build
gnu-build-system
standard-packages
@@ -213,18 +215,16 @@ flags for VARIABLE, the associated value is augmented."
(define* (static-package p #:key (strip-all? #t))
"Return a statically-linked version of package P. If STRIP-ALL? is true,
use `--strip-all' as the arguments to `strip'."
- (package (inherit p)
+ (package
+ (inherit p)
(arguments
- (let ((a (default-keyword-arguments (package-arguments p)
- '(#:configure-flags '()
- #:strip-flags '("--strip-unneeded")))))
- (substitute-keyword-arguments a
- ((#:configure-flags flags)
- `(cons* "--disable-shared" "LDFLAGS=-static" ,flags))
- ((#:strip-flags flags)
- (if strip-all?
- ''("--strip-all")
- flags)))))
+ (substitute-keyword-arguments (package-arguments p)
+ ((#:configure-flags flags #~'())
+ #~(cons* "--disable-shared" "LDFLAGS=-static" #$flags))
+ ((#:strip-flags flags #~'("--strip-unneeded"))
+ (if strip-all?
+ #~'("--strip-all")
+ flags))))
(replacement (and=> (package-replacement p) static-package))))
(define* (dist-package p source #:key (phases '%dist-phases))
diff --git a/guix/build-system/maven.scm b/guix/build-system/maven.scm
index 0af5922692..9a17dea977 100644
--- a/guix/build-system/maven.scm
+++ b/guix/build-system/maven.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -154,9 +154,8 @@
(exclude %default-exclude)
(local-packages '())
(tests? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '%standard-phases)
(system (%current-system))
(imported-modules %maven-build-system-modules)
@@ -184,8 +183,8 @@ provides its own binaries."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)))))
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
system #:graft? #f)))
diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index 7d413a991d..bf43303027 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2017 Peter Mikkelsen <petermikkelsen10@gmail.com>
;;; Copyright © 2018, 2019 Marius Bakke <mbakke@fastmail.com>
-;;; Copyright © 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021, 2022 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 Efraim Flashner <efraim@flashner.co.il>
;;;
@@ -174,9 +174,8 @@ TRIPLET."
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(elf-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
(phases '%standard-phases)
@@ -222,8 +221,8 @@ has a 'meson.build' file."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories
#:elf-directories #$(sexp->gexp elf-directories))))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
@@ -256,9 +255,8 @@ has a 'meson.build' file."
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(elf-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
;; See 'gnu-cross-build' for why this needs to be
@@ -335,8 +333,8 @@ SOURCE has a 'meson.build' file."
#:validate-runpath? #$validate-runpath?
#:patch-shebangs? #$patch-shebangs?
#:strip-binaries? #$strip-binaries?
- #:strip-flags #$(sexp->gexp strip-flags)
- #:strip-directories #$(sexp->gexp strip-directories)
+ #:strip-flags #$strip-flags
+ #:strip-directories #$strip-directories
#:elf-directories #$(sexp->gexp elf-directories)))))
(mlet %store-monad ((guile (package->derivation (or guile (default-guile))
diff --git a/guix/build-system/mozilla.scm b/guix/build-system/mozilla.scm
new file mode 100644
index 0000000000..bead1bf5bb
--- /dev/null
+++ b/guix/build-system/mozilla.scm
@@ -0,0 +1,52 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (guix build-system mozilla)
+ #:use-module (guix build-system gnu)
+ #:use-module (guix build-system)
+ #:use-module (guix utils)
+ #:export (mozilla-build-system))
+
+;;
+;; Build procedure for packages using Autotools with the Mozillian conventions
+;; for --target, --host and --build, which are different from the GNU
+;; conventions.
+;;
+;; Code:
+
+(define* (lower-mozilla name #:key system target #:allow-other-keys
+ #:rest arguments)
+ (define lower (build-system-lower gnu-build-system))
+ (if target
+ (apply lower name
+ (substitute-keyword-arguments arguments
+ ;; Override --target and --host to what Mozillian configure
+ ;; scripts expect.
+ ((#:configure-flags configure-flags ''())
+ `(cons* ,(string-append "--target=" target)
+ ,(string-append "--host=" (nix-system->gnu-triplet system))
+ ,configure-flags))))
+ (apply lower name arguments))) ; not cross-compiling
+
+(define mozilla-build-system
+ (build-system
+ (name 'mozilla)
+ (description "The build system for Mozilla software using the Autotools")
+ (lower lower-mozilla)))
+
+;;; mozilla.scm ends here
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm
index 921c1f8629..6e1fc62a62 100644
--- a/guix/build-system/ocaml.scm
+++ b/guix/build-system/ocaml.scm
@@ -270,9 +270,8 @@ pre-defined variants."
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '(@ (guix build ocaml-build-system)
%standard-phases))
(system (%current-system))
diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm
index 7e3a54f1f8..25fd18f8a8 100644
--- a/guix/build-system/qt.scm
+++ b/guix/build-system/qt.scm
@@ -135,9 +135,8 @@
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '%standard-phases)
(qt-wrap-excluded-outputs ''())
(qt-wrap-excluded-inputs %qt-wrap-excluded-inputs)
@@ -209,10 +208,8 @@ provides a 'CMakeLists.txt' file as its build system."
(validate-runpath? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
- "--enable-deterministic-archives"))
- (strip-directories ''("lib" "lib64" "libexec"
- "bin" "sbin"))
+ (strip-flags %strip-flags)
+ (strip-directories %strip-directories)
(phases '%standard-phases)
(system (%current-system))
(build (nix-system->gnu-triplet system))