Archived
1
0
Fork 0

gnu: gn: Build with Python 3.

* gnu/packages/build-tools.scm (gn)[native-inputs]: Change from PYTHON-2 to
PYTHON-WRAPPER.
[arguments]: Remove trailing #t's and make some cosmetic changes.
This commit is contained in:
Marius Bakke 2021-05-13 12:34:17 +02:00
parent 426bed1f39
commit 8be3cd6ce9
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -218,8 +218,7 @@ programs and other files depend.")
(add-before 'configure 'set-build-environment (add-before 'configure 'set-build-environment
(lambda _ (lambda _
(setenv "CC" "gcc") (setenv "CXX" "g++") (setenv "CC" "gcc") (setenv "CXX" "g++")
(setenv "AR" "ar") (setenv "AR" "ar")))
#t))
(replace 'configure (replace 'configure
(lambda _ (lambda _
(invoke "python" "build/gen.py" (invoke "python" "build/gen.py"
@ -234,16 +233,15 @@ programs and other files depend.")
(string-append (string-append
"#define LAST_COMMIT_POSITION_NUM ~a\n" "#define LAST_COMMIT_POSITION_NUM ~a\n"
"#define LAST_COMMIT_POSITION \"~a (~a)\"\n") "#define LAST_COMMIT_POSITION \"~a (~a)\"\n")
,revision ,revision ,(string-take commit 8)) ,revision ,revision ,(string-take commit 8))))))
#t))))
(replace 'build (replace 'build
(lambda _ (lambda _
(invoke "ninja" "-C" "out" "gn" (invoke "ninja" "-C" "out" "gn"
"-j" (number->string (parallel-job-count))))) "-j" (number->string (parallel-job-count)))))
(replace 'check (replace 'check
(lambda* (#:key (tests? #t) #:allow-other-keys) (lambda* (#:key tests? #:allow-other-keys)
(if tests? (if tests?
(lambda () (begin
(invoke "ninja" "-C" "out" "gn_unittests" (invoke "ninja" "-C" "out" "gn_unittests"
"-j" (number->string (parallel-job-count))) "-j" (number->string (parallel-job-count)))
(invoke "./out/gn_unittests")) (invoke "./out/gn_unittests"))
@ -251,11 +249,10 @@ programs and other files depend.")
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(install-file "out/gn" (string-append out "/bin")) (install-file "out/gn" (string-append out "/bin"))))))))
#t))))))
(native-inputs (native-inputs
`(("ninja" ,ninja) `(("ninja" ,ninja)
("python" ,python-2))) ("python" ,python-wrapper)))
(synopsis "Generate Ninja build files") (synopsis "Generate Ninja build files")
(description (description
"GN is a tool that collects information about a project from @file{.gn} "GN is a tool that collects information about a project from @file{.gn}