From 3ad0a35890ea3142e0ac16a8be6addd1693a10a1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 12 Sep 2018 13:45:34 +0200 Subject: gnu: Add GN. * gnu/packages/build-tools.scm (gn): New public variable. --- gnu/packages/build-tools.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) (limited to 'gnu/packages/build-tools.scm') diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 4fc2d5acf7..42de56f8c3 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Tomáš Čech +;;; Copyright © 2018 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -98,6 +99,63 @@ it is easy to re-run the compilation with alternate programs. Bear is used to generate such a compilation database.") (license license:gpl3+))) +(define-public gn + (let ((commit "f73698ebb33e26a0bf120e2b55d12528fd1dbe7d") + (revision "1481")) ;as returned by `git describe`, used below + (package + (name "gn") + (version (git-version "0.0" revision commit)) + (home-page "https://gn.googlesource.com/gn") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (sha256 + (base32 + "078ydwak4424bkqh3hd7q955zxp2c3qlw44lsb29i8jqap140f9d")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;FIXME: How to run? + #:phases (modify-phases %standard-phases + (add-before 'configure 'set-build-environment + (lambda _ + (setenv "CC" "gcc") (setenv "CXX" "g++") + (setenv "AR" "ar") + #t)) + (replace 'configure + (lambda _ + (invoke "python" "build/gen.py" "--no-sysroot" + "--no-last-commit-position"))) + (add-after 'configure 'create-last-commit-position + (lambda _ + ;; Create "last_commit_position.h" to avoid a dependency + ;; on 'git' (and the checkout..). + (call-with-output-file "out/last_commit_position.h" + (lambda (port) + (format port + "#define LAST_COMMIT_POSITION \"~a (~a)\"\n" + ,revision ,(string-take commit 8)) + #t)))) + (replace 'build + (lambda _ + (invoke "ninja" "-C" "out" "gn" + "-j" (number->string (parallel-job-count))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "out/gn" (string-append out "/bin")) + #t)))))) + (native-inputs + `(("ninja" ,ninja) + ("python" ,python-2))) + (synopsis "Generate Ninja build files") + (description + "GN is a tool that collects information about a project from @file{.gn} +files and generates build instructions for the Ninja build system.") + ;; GN is distributed as BSD-3, but bundles some files from ICU using the + ;; X11 license. + (license (list license:bsd-3 license:x11))))) + (define-public meson (package (name "meson") -- cgit v1.2.3 d841e1dfad6b13e26082a5750'>daemon: Do not deduplicate files smaller than 8 KiB....Ludovic Courtès 2021-10-01build: Don’t delete ‘guix-gc.timer’ file....Xinglu Chen 2021-09-20etc: Add systemd files for running ‘guix gc’ periodically...Thiago Jung Bauermann 2021-04-09daemon: 'guix substitute' replies on FD 4....Ludovic Courtès 2021-04-03daemon: Remove dead code....Ludovic Courtès 2021-03-30gnu: guix: Fix openrc init scripts....zimoun 2021-03-18daemon: Prevent privilege escalation with '--keep-failed' [security]....Ludovic Courtès 2021-03-17daemon: Correctly handle '--discover' with no value....Ludovic Courtès 2020-12-19daemon: Delegate deduplication to 'guix substitute'....Ludovic Courtès 2020-12-19daemon: Do not reset timestamps and permissions on substituted items....Ludovic Courtès 2020-12-19daemon: Let 'guix substitute' perform hash checks....Ludovic Courtès 2020-12-08daemon: Raise an error if substituter doesn't send the expected hash....Ludovic Courtès 2020-12-08substitute: Cache and reuse connections while substituting....Ludovic Courtès 2020-12-08daemon: Run 'guix substitute --substitute' as an agent....Ludovic Courtès 2020-12-08daemon: Factorize substituter agent spawning....Ludovic Courtès 2020-12-08daemon: Use 'Agent' to spawn 'guix substitute --query'....Ludovic Courtès 2020-12-08daemon: 'Agent' constructor takes a list of environment variables....Ludovic Courtès 2020-12-01daemon: Remove unneeded forward declaration....Ludovic Courtès 2020-11-29daemon: Remove pre-Guix hack....Ludovic Courtès 2020-11-29Use substitute servers on the local network....Mathieu Othacehe 2020-10-27maint: Add 'etc/gnu-store.mount.in' to the distribution....Ludovic Courtès 2020-10-09nix: Honor '--rounds' when also using '--check'....Maxim Cournoyer 2020-10-01daemon: Try to execute derivation builders only for matching OS kernels....Ludovic Courtès 2020-09-17guix-install.sh: Support OpenRC....Morgan Smith 2020-09-14daemon: Spawn 'guix authenticate' once for all....Ludovic Courtès 2020-09-14daemon: Move 'Agent' to libutil....Ludovic Courtès 2020-09-14daemon: Isolate signing and signature verification functions....Ludovic Courtès 2020-09-14daemon: Generalize 'HookInstance' to 'Agent'....Ludovic Courtès 2020-09-11daemon: Simplify interface with 'guix authenticate'....Ludovic Courtès 2020-06-27daemon: Recognize SHA3 and BLAKE2s....Ludovic Courtès 2020-06-27daemon: Remove OpenSSL hash compatibility wrappers....Ludovic Courtès 2020-06-27daemon: Map directly to gcrypt hash functions....Ludovic Courtès 2020-06-25daemon: Correctly handle EMLINK corner case when deduplicating....Ludovic Courtès 2020-06-24nix: Tweak .gitignore files....Christopher Baines 2020-06-06daemon: Handle EXDEV when moving to trash directory....Chris Marusich 2020-05-23build: Add a comment above the sysvinit section....Vincent Legoll 2020-05-17etc: Install mount unit only if it exists....Tobias Geerinckx-Rice 2020-05-16etc: Add a systemd unit to bind-mount @storedir@ read-only....Tobias Geerinckx-Rice 2020-03-26daemon: Avoid kill -1 bug on the Hurd....Manolis Ragkousis 2020-03-26daemon: Do not use clone on the Hurd....Manolis Ragkousis 2020-03-11Add system start-up files for guix-daemon....Danny Milosavljevic