gnuzilla.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2013, 2015 Andreas Enge <andreas@enge.fr> |
| 3 | ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> |
| 4 | ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver <mhw@netris.org> |
| 5 | ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> |
| 6 | ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> |
| 7 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
| 8 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
| 9 | ;;; |
| 10 | ;;; This file is part of GNU Guix. |
| 11 | ;;; |
| 12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 13 | ;;; under the terms of the GNU General Public License as published by |
| 14 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 15 | ;;; your option) any later version. |
| 16 | ;;; |
| 17 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;;; GNU General Public License for more details. |
| 21 | ;;; |
| 22 | ;;; You should have received a copy of the GNU General Public License |
| 23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 24 | |
| 25 | (define-module (more packages gnuzilla) |
| 26 | #:use-module ((srfi srfi-1) #:hide (zip)) |
| 27 | #:use-module (gnu packages) |
| 28 | #:use-module ((guix licenses) #:prefix license:) |
| 29 | #:use-module (guix utils) |
| 30 | #:use-module (guix packages) |
| 31 | #:use-module (guix download) |
| 32 | #:use-module (guix build-system cargo) |
| 33 | #:use-module (guix build-system gnu) |
| 34 | #:use-module (more packages google) |
| 35 | #:use-module (gnu packages assembly) |
| 36 | #:use-module (gnu packages autotools) |
| 37 | #:use-module (gnu packages base) |
| 38 | #:use-module (gnu packages bison) |
| 39 | #:use-module (gnu packages cmake) |
| 40 | #:use-module (gnu packages compression) |
| 41 | #:use-module (gnu packages cups) |
| 42 | #:use-module (gnu packages curl) |
| 43 | #:use-module (gnu packages databases) |
| 44 | #:use-module (gnu packages flex) |
| 45 | #:use-module (gnu packages fontutils) |
| 46 | #:use-module (gnu packages gl) |
| 47 | #:use-module (gnu packages glib) |
| 48 | #:use-module (gnu packages gnome) |
| 49 | #:use-module (gnu packages gnuzilla) |
| 50 | #:use-module (gnu packages gtk) |
| 51 | #:use-module (gnu packages icu4c) |
| 52 | #:use-module (gnu packages image) |
| 53 | #:use-module (gnu packages libcanberra) |
| 54 | #:use-module (gnu packages libevent) |
| 55 | #:use-module (gnu packages libffi) |
| 56 | #:use-module (gnu packages libreoffice) |
| 57 | #:use-module (gnu packages linux) |
| 58 | #:use-module (gnu packages llvm) |
| 59 | #:use-module (gnu packages perl) |
| 60 | #:use-module (gnu packages pkg-config) |
| 61 | #:use-module (gnu packages pulseaudio) |
| 62 | #:use-module (gnu packages python) |
| 63 | #:use-module (gnu packages rust) |
| 64 | #:use-module (gnu packages version-control) |
| 65 | #:use-module (gnu packages video) |
| 66 | #:use-module (gnu packages xdisorg) |
| 67 | #:use-module (gnu packages xorg)) |
| 68 | |
| 69 | (define-public icecat-skia |
| 70 | (package |
| 71 | (inherit icecat) |
| 72 | (name "icecat-skia") |
| 73 | (inputs |
| 74 | `(("skia" ,skia) |
| 75 | ,@(package-inputs icecat))) |
| 76 | (arguments (substitute-keyword-arguments (package-arguments icecat) |
| 77 | ((#:configure-flags flags) |
| 78 | `(cons* "--enable-skia" ,flags)))))) |
| 79 | |
| 80 | (define-public firefox |
| 81 | (package |
| 82 | (name "firefox") |
| 83 | (version "58.0") |
| 84 | (source (origin |
| 85 | (method url-fetch) |
| 86 | (uri (string-append "https://archive.mozilla.org/pub/firefox/" |
| 87 | "releases/" version "/source/firefox-" |
| 88 | version ".source.tar.xz")) |
| 89 | (sha256 |
| 90 | (base32 |
| 91 | "1zxapyir31zr1k7qrixqayzafh3kkvx0hh5vv1kp8kgrmg53j2hf")) |
| 92 | (modules '((guix build utils))) |
| 93 | (snippet |
| 94 | '(begin |
| 95 | (use-modules (ice-9 ftw)) |
| 96 | ;; Remove bundled libraries that we don't use, since they may |
| 97 | ;; contain unpatched security flaws, they waste disk space and |
| 98 | ;; network bandwidth, and may cause confusion. |
| 99 | (for-each delete-file-recursively |
| 100 | '(;; FIXME: Removing the bundled icu breaks configure. |
| 101 | ;; * The bundled icu headers are used in some places. |
| 102 | ;; * The version number is taken from the bundled copy. |
| 103 | ;;"intl/icu" |
| 104 | ;; |
| 105 | ;; FIXME: A script from the bundled nspr is used. |
| 106 | ;;"nsprpub" |
| 107 | ;; |
| 108 | ;; TODO: Use system media libraries. Waiting for: |
| 109 | ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> |
| 110 | ;; * libogg |
| 111 | ;; * libtheora |
| 112 | ;; * libvorbis |
| 113 | ;; * libtremor (not yet in guix) |
| 114 | ;; * libopus |
| 115 | ;; * speex |
| 116 | ;; * soundtouch (not yet in guix) |
| 117 | ;; |
| 118 | ;; TODO: Use system harfbuzz. Waiting for: |
| 119 | ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=847568> |
| 120 | ;; |
| 121 | ;; TODO: Use system graphite2. |
| 122 | ;; |
| 123 | "modules/freetype2" |
| 124 | "modules/zlib" |
| 125 | "modules/libbz2" |
| 126 | "ipc/chromium/src/third_party/libevent" |
| 127 | "media/libjpeg" |
| 128 | "media/libvpx" |
| 129 | "security/nss" |
| 130 | "gfx/cairo" |
| 131 | "js/src/ctypes/libffi" |
| 132 | "db/sqlite3")) |
| 133 | ;; Delete .pyc files, typically present in icecat source tarballs |
| 134 | (for-each delete-file (find-files "." "\\.pyc$")) |
| 135 | ;; Delete obj-* directories, sometimes present in icecat tarballs |
| 136 | (for-each delete-file-recursively |
| 137 | (scandir "." (lambda (name) |
| 138 | (string-prefix? "obj-" name)))) |
| 139 | #t)))) |
| 140 | (build-system gnu-build-system) |
| 141 | (arguments |
| 142 | `(#:out-of-source? #t |
| 143 | #:tests? #f |
| 144 | #:make-flags (list "--disable-necko-wifi" |
| 145 | "--disable-stylo" |
| 146 | "--disable-crashreporter" |
| 147 | "--disable-updater" |
| 148 | "--disable-tests"; Remove if we want to test |
| 149 | "--disable-stylo"; FIXME |
| 150 | "--enable-application=browser" |
| 151 | "--enable-optimize=-O2" |
| 152 | "--with-pthreads" |
| 153 | ;; use system libraries |
| 154 | "--enable-system-hunspell" |
| 155 | "--enable-startup-notification" |
| 156 | "--enable-alsa" "--enable-pulseaudio" |
| 157 | "--enable-system-sqlite" |
| 158 | "--with-system-libevent" |
| 159 | "--with-system-libvpx" |
| 160 | "--with-system-nspr" |
| 161 | "--with-system-nss" |
| 162 | "--with-system-icu" |
| 163 | "--with-system-graphite2" |
| 164 | "--with-system-harfbuzz" |
| 165 | "--enable-system-cairo" |
| 166 | "--enable-system-ffi" |
| 167 | "--enable-system-pixman" |
| 168 | "--with-system-bz2" |
| 169 | "--with-system-jpeg" |
| 170 | "--with-system-png" |
| 171 | "--with-system-zlib") |
| 172 | #:phases |
| 173 | (modify-phases %standard-phases |
| 174 | (replace |
| 175 | 'configure |
| 176 | ;; configure does not work followed by both "SHELL=..." and |
| 177 | ;; "CONFIG_SHELL=..."; set environment variables instead |
| 178 | (lambda* (#:key outputs configure-flags #:allow-other-keys) |
| 179 | (let* ((out (assoc-ref outputs "out")) |
| 180 | (bash (which "bash")) |
| 181 | (abs-srcdir (getcwd)) |
| 182 | (srcdir (string-append "../" (basename abs-srcdir))) |
| 183 | (flags `(,(string-append "--prefix=" out) |
| 184 | ,(string-append "--with-l10n-base=" |
| 185 | abs-srcdir "/intl/l10n") |
| 186 | ,@configure-flags))) |
| 187 | (setenv "SHELL" bash) |
| 188 | (setenv "CONFIG_SHELL" bash) |
| 189 | (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13 |
| 190 | (mkdir "../build") |
| 191 | (chdir "../build") |
| 192 | (format #t "build directory: ~s~%" (getcwd)) |
| 193 | (format #t "configure flags: ~s~%" flags) |
| 194 | (zero? (apply system* bash |
| 195 | (string-append srcdir "/configure") |
| 196 | flags)))))))) |
| 197 | (inputs |
| 198 | `(("alsa-lib" ,alsa-lib) |
| 199 | ("bzip2" ,bzip2) |
| 200 | ("cairo" ,cairo) |
| 201 | ("cups" ,cups) |
| 202 | ("dbus-glib" ,dbus-glib) |
| 203 | ("gdk-pixbuf" ,gdk-pixbuf) |
| 204 | ("glib" ,glib) |
| 205 | ("gtk+" ,gtk+) |
| 206 | ("gtk+-2" ,gtk+-2) |
| 207 | ("pango" ,pango) |
| 208 | ("freetype" ,freetype) |
| 209 | ("hunspell" ,hunspell) |
| 210 | ("libcanberra" ,libcanberra) |
| 211 | ("libgnome" ,libgnome) |
| 212 | ("libjpeg-turbo" ,libjpeg-turbo) |
| 213 | ("libxft" ,libxft) |
| 214 | ("libevent" ,libevent-2.0) |
| 215 | ("libxinerama" ,libxinerama) |
| 216 | ("libxscrnsaver" ,libxscrnsaver) |
| 217 | ("libxcomposite" ,libxcomposite) |
| 218 | ("libxt" ,libxt) |
| 219 | ("libffi" ,libffi) |
| 220 | ("ffmpeg" ,ffmpeg) |
| 221 | ("libvpx" ,libvpx) |
| 222 | ("icu4c" ,icu4c) |
| 223 | ("pixman" ,pixman) |
| 224 | ("pulseaudio" ,pulseaudio) |
| 225 | ("mesa" ,mesa) |
| 226 | ("nspr" ,nspr) |
| 227 | ("nss" ,nss) |
| 228 | ("sqlite" ,sqlite) |
| 229 | ("startup-notification" ,startup-notification) |
| 230 | ("unzip" ,unzip) |
| 231 | ("zip" ,zip) |
| 232 | ("zlib" ,zlib))) |
| 233 | (native-inputs |
| 234 | `(("perl" ,perl) |
| 235 | ("python" ,python-2) ; Python 3 not supported |
| 236 | ("python2-pysqlite" ,python2-pysqlite) |
| 237 | ("yasm" ,yasm) |
| 238 | ("pkg-config" ,pkg-config) |
| 239 | ("autoconf" ,autoconf-2.13) |
| 240 | ("which" ,which) |
| 241 | ("rust" ,rustc) |
| 242 | ("cargo" ,cargo) |
| 243 | ("clang-3.9.1" ,clang-3.9.1) |
| 244 | ("llvm-3.9.1" ,llvm-3.9.1))) |
| 245 | (home-page "https://mozilla.org") |
| 246 | (synopsis "Web browser") |
| 247 | (description "") |
| 248 | (license (package-license icecat)))) |
| 249 |