@@ -177,6 +177,44 @@ files and generates build instructions for the Ninja build system.")
;; X11 license.
(license (list license:bsd-3 license:x11)))))
+(define-public gn-for-dart-bootstrap
+ (let ((commit "041ed5e79abc24956f296ca8bc94d04e26cf3d6b")
+ (revision "1353")
+ (hash "1zd41zwggamkqy33cra75cfdx82v3spdfym6hj1lbbanabi4mpl7"))
+ (package
+ (inherit gn)
+ (name "gn-for-dart-bootstrap")
+ (version (git-version "0.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://gn.googlesource.com/gn")
+ (commit commit)))
+ (sha256 (base32 hash))
+ (file-name (git-file-name name version))))
+ (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")))
+ (replace 'build
+ (lambda _
+ (invoke "ninja" "-C" "out" "gn")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (install-file "out/gn"
+ (string-append out "/bin"))
+ #t)))))))))
+
(define-public meson
(package
(name "meson")