guix-more/more/packages/google.scm

google.scm

1
;;; GNU Guix --- Functional package management for GNU
2
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
3
;;;
4
;;; This file is part of GNU Guix.
5
;;;
6
;;; GNU Guix is free software; you can redistribute it and/or modify it
7
;;; under the terms of the GNU General Public License as published by
8
;;; the Free Software Foundation; either version 3 of the License, or (at
9
;;; your option) any later version.
10
;;;
11
;;; GNU Guix is distributed in the hope that it will be useful, but
12
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
;;; GNU General Public License for more details.
15
;;;
16
;;; You should have received a copy of the GNU General Public License
17
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
18
19
(define-module (more packages google)
20
  #:use-module ((guix licenses) #:prefix license:)
21
  #:use-module (gnu packages)
22
  #:use-module (gnu packages python)
23
  #:use-module (gnu packages perl)
24
  #:use-module (gnu packages ruby)
25
  #:use-module (gnu packages ninja)
26
  #:use-module (guix packages)
27
  #:use-module (guix download)
28
  #:use-module (guix git-download)
29
  #:use-module (guix utils)
30
  #:use-module (guix build-system gnu)
31
  #:use-module (srfi srfi-1))
32
33
(define-public chromium
34
  (package
35
    (name "chromium")
36
    (version "56.0.2924.87")
37
    (source
38
      (origin
39
        (method url-fetch)
40
        (uri (string-append "https://commondatastorage.googleapis.com/"
41
                            "chromium-browser-official/" name "-" version ".tar.xz"))
42
        (sha256
43
         (base32
44
          "1q2kg85pd6lv036w7lsss5mhiiva9rx4f0410sbn9bnazhghib4s"))
45
        (modules '((guix build utils)))
46
        (snippet
47
         '(begin
48
           (for-each delete-file-recursively
49
                     (find-files "." "third_party"))))))
50
    (build-system gnu-build-system)
51
    (home-page "https://chromium.googlesource.com/chromium/src")
52
    (synopsis "Google web browser")
53
    (description "Google web browser.")
54
    (license "bsd-3")))
55
56
(define-public google-gn
57
  (package
58
    (inherit chromium)
59
    (name "google-gn")
60
    (version "0")
61
    (build-system gnu-build-system)
62
    (arguments
63
     `(#:tests? #f
64
       #:phases
65
       (modify-phases %standard-phases
66
         (delete 'configure)
67
         (replace 'build
68
           (lambda* (#:key outputs #:allow-other-keys)
69
             (chdir "tools/gn")
70
             (setenv "CC" (which "gcc"))
71
             (zero? (system* "python" "bootstrap/bootstrap.py" "-s"))))
72
         (replace 'install
73
           (lambda* (#:key outputs #:allow-other-keys)
74
             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
75
               (mkdir-p bin)
76
               (copy-file "../../out/Release/gn" (string-append bin "/gn"))))))))
77
    (native-inputs
78
     `(("python" ,python-2)
79
       ("ninja" ,ninja)))
80
    (home-page "https://chromium.googlesource.com/chromium/buildtools.git")
81
    (synopsis "Google gn")
82
    (description "Google gn.")
83
    (license license:bsd-3)))
84