gnu: gn: Use G-expression.
* gnu/packages/build-tools.scm (gn)[arguments]: Convert to G-expression.master
parent
e069db7e30
commit
6f0a8371fe
|
@ -219,22 +219,24 @@ programs and other files depend.")
|
|||
(file-name (git-file-name name version))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases (modify-phases %standard-phases
|
||||
(add-before 'configure 'set-build-environment
|
||||
(lambda _
|
||||
(setenv "CC" "gcc") (setenv "CXX" "g++")
|
||||
(setenv "AR" "ar")))
|
||||
(replace 'configure
|
||||
(lambda _
|
||||
(invoke "python" "build/gen.py"
|
||||
"--no-last-commit-position")))
|
||||
(add-after 'configure 'create-last-commit-position
|
||||
(lambda _
|
||||
;; Mimic GenerateLastCommitPosition from gen.py.
|
||||
(call-with-output-file "out/last_commit_position.h"
|
||||
(lambda (port)
|
||||
(format port
|
||||
"// Generated by Guix.
|
||||
(list #:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-before 'configure 'set-build-environment
|
||||
(lambda _
|
||||
(setenv "CC" "gcc")
|
||||
(setenv "CXX" "g++")
|
||||
(setenv "AR" "ar")))
|
||||
(replace 'configure
|
||||
(lambda _
|
||||
(invoke "python" "build/gen.py"
|
||||
"--no-last-commit-position")))
|
||||
(add-after 'configure 'create-last-commit-position
|
||||
(lambda _
|
||||
;; Mimic GenerateLastCommitPosition from gen.py.
|
||||
(call-with-output-file "out/last_commit_position.h"
|
||||
(lambda (port)
|
||||
(format port
|
||||
"// Generated by Guix.
|
||||
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
@ -244,23 +246,23 @@ programs and other files depend.")
|
|||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
"
|
||||
,revision ,revision ,(string-take commit 12))))))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke "ninja" "-C" "out" "gn"
|
||||
"-j" (number->string (parallel-job-count)))))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(if tests?
|
||||
(begin
|
||||
(invoke "ninja" "-C" "out" "gn_unittests"
|
||||
"-j" (number->string (parallel-job-count)))
|
||||
(invoke "./out/gn_unittests"))
|
||||
(format #t "test suite not run~%"))))
|
||||
(replace 'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(install-file "out/gn" (string-append out "/bin"))))))))
|
||||
#$revision #$revision
|
||||
#$(string-take commit 12))))))
|
||||
(replace 'build
|
||||
(lambda _
|
||||
(invoke "ninja" "-C" "out" "gn"
|
||||
"-j" (number->string (parallel-job-count)))))
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(if tests?
|
||||
(begin
|
||||
(invoke "ninja" "-C" "out" "gn_unittests"
|
||||
"-j" (number->string (parallel-job-count)))
|
||||
(invoke "./out/gn_unittests"))
|
||||
(format #t "test suite not run~%"))))
|
||||
(replace 'install
|
||||
(lambda _
|
||||
(install-file "out/gn" (string-append #$output "/bin")))))))
|
||||
(native-inputs
|
||||
(list ninja python-wrapper))
|
||||
(synopsis "Generate Ninja build files")
|
||||
|
|
Reference in New Issue