From c02a77bdd6a54f1b2d8c503c5f5db101ad6c962d Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 28 Nov 2022 04:28:03 +0100 Subject: gnu: gn: Update to 0.0-2072.1c4151f. * gnu/packages/build-tools.scm (gn): Update to 0.0-2072.1c4151f. [arguments]: Adjust create-last-commit-position phase to be identical with upstream code. --- gnu/packages/build-tools.scm | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'gnu/packages/build-tools.scm') diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index 8627f699a1..cd6ff53a21 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -204,8 +204,8 @@ programs and other files depend.") (license license:bsd-3))) (define-public gn - (let ((commit "e327ffdc503815916db2543ec000226a8df45163") - (revision "1819")) ;as returned by `git describe`, used below + (let ((commit "1c4151ff5c1d6fbf7fa800b8d4bb34d3abc03a41") + (revision "2072")) ;as returned by `git describe`, used below (package (name "gn") (version (git-version "0.0" revision commit)) @@ -215,7 +215,7 @@ programs and other files depend.") (uri (git-reference (url home-page) (commit commit))) (sha256 (base32 - "0kvlfj3www84zp1vmxh76x8fdjm9hyk8lkh2vdsidafpmm75fphr")) + "02621c9nqpr4pwcapy31x36l5kbyd0vdgd0wdaxj5p8hrxk67d6b")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -230,15 +230,21 @@ programs and other files depend.") "--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..). + ;; Mimic GenerateLastCommitPosition from gen.py. (call-with-output-file "out/last_commit_position.h" (lambda (port) (format port - (string-append - "#define LAST_COMMIT_POSITION_NUM ~a\n" - "#define LAST_COMMIT_POSITION \"~a (~a)\"\n") - ,revision ,revision ,(string-take commit 8)))))) + "// Generated by Guix. + +#ifndef OUT_LAST_COMMIT_POSITION_H_ +#define OUT_LAST_COMMIT_POSITION_H_ + +#define LAST_COMMIT_POSITION_NUM ~a +#define LAST_COMMIT_POSITION \"~a (~a)\" + +#endif // OUT_LAST_COMMIT_POSITION_H_ +" + ,revision ,revision ,(string-take commit 12)))))) (replace 'build (lambda _ (invoke "ninja" "-C" "out" "gn" -- cgit 1.4.1