me
/
guix
Archived
1
0
Fork 0

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.
master
Marius Bakke 2022-11-28 04:28:03 +01:00
parent 34a70b1f86
commit c02a77bdd6
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 15 additions and 9 deletions

View File

@ -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"