;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
+;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
(define-public ninja
(package
(name "ninja")
- (version "1.5.3")
+ (version "1.9.0")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/martine/ninja/"
"archive/v" version ".tar.gz"))
+ (file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "1h3yfwcfl61v493vna6jia2fizh8rpig7qw2504cvkr6gid3p5bw"))
- (patches (list (search-patch "ninja-tests.patch")))))
+ "1ffmzj5s9h98qhl94d9i23zcv057rsqbac9g1hdgvlzq51ccfzjx"))))
(build-system gnu-build-system)
+ (inputs `(("python" ,python-wrapper)))
(arguments
'(#:phases
- (alist-replace
- 'configure
- (lambda _
- (substitute* "src/subprocess-posix.cc"
- (("/bin/sh") (which "sh"))))
- (alist-replace
- 'build
- (lambda _
- (zero? (system* "./configure.py" "--bootstrap")))
- (alist-replace
- 'check
- (lambda _
- (and (zero? (system* "./configure.py"))
- (zero? (system* "./ninja" "ninja_test"))
- (zero? (system* "./ninja_test"))))
- (alist-replace
- 'install
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ (substitute* "src/subprocess-posix.cc"
+ (("/bin/sh") (which "sh")))
+ (substitute* "src/subprocess_test.cc"
+ (("/bin/echo") (which "echo")))
+ #t))
+ (replace 'build
+ (lambda _
+ (invoke "./configure.py" "--bootstrap")))
+ (replace 'check
+ (lambda _
+ (invoke "./configure.py")
+ (invoke "./ninja" "ninja_test")
+ (invoke "./ninja_test")))
+ (replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(doc (string-append out "/share/doc/ninja")))
- (mkdir-p bin)
- (copy-file "ninja" (string-append bin "/ninja"))
- (mkdir-p doc)
- (copy-file "doc/manual.asciidoc"
- (string-append doc "/manual.asciidoc"))))
- %standard-phases))))))
- (native-inputs `(("python" ,python-2)))
- (home-page "http://martine.github.io/ninja/")
+ (install-file "ninja" bin)
+ (install-file "doc/manual.asciidoc" doc)
+ #t))))))
+ (home-page "https://ninja-build.org/")
(synopsis "Small build system")
(description
"Ninja is a small build system with a focus on speed. It differs from