;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2014, 2015, 2016, 2017 Mark H Weaver ;;; Copyright © 2015 Sou Bunnbu ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2017 Julien Lepiller ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (more packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system cargo) #:use-module (guix build-system gnu) #:use-module (more packages google) #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cups) #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) #:use-module (gnu packages gl) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages gtk) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages libreoffice) #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages rust) #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg)) (define-public icecat-skia (package (inherit icecat) (name "icecat-skia") (inputs `(("skia" ,skia) ,@(package-inputs icecat))) (arguments (substitute-keyword-arguments (package-arguments icecat) ((#:configure-flags flags) `(cons* "--enable-skia" ,flags)))))) (define-public firefox (package (name "firefox") (version "57.0") (source (origin (method url-fetch) (uri (string-append "https://archive.mozilla.org/pub/firefox/" "releases/" version "/source/firefox-" version ".source.tar.xz")) (sha256 (base32 "13xvxzpp5l3amrd6jcpnn7d1q7wpf80dsiw0qp4z51xyal0z0fk0")) (modules '((guix build utils))) (snippet '(begin (use-modules (ice-9 ftw)) ;; Remove bundled libraries that we don't use, since they may ;; contain unpatched security flaws, they waste disk space and ;; network bandwidth, and may cause confusion. (for-each delete-file-recursively '(;; FIXME: Removing the bundled icu breaks configure. ;; * The bundled icu headers are used in some places. ;; * The version number is taken from the bundled copy. ;;"intl/icu" ;; ;; FIXME: A script from the bundled nspr is used. ;;"nsprpub" ;; ;; TODO: Use system media libraries. Waiting for: ;; ;; * libogg ;; * libtheora ;; * libvorbis ;; * libtremor (not yet in guix) ;; * libopus ;; * speex ;; * soundtouch (not yet in guix) ;; ;; TODO: Use system harfbuzz. Waiting for: ;; ;; ;; TODO: Use system graphite2. ;; "modules/freetype2" "modules/zlib" "modules/libbz2" "ipc/chromium/src/third_party/libevent" "media/libjpeg" "media/libvpx" "security/nss" "gfx/cairo" "js/src/ctypes/libffi" "db/sqlite3")) ;; Delete .pyc files, typically present in icecat source tarballs (for-each delete-file (find-files "." "\\.pyc$")) ;; Delete obj-* directories, sometimes present in icecat tarballs (for-each delete-file-recursively (scandir "." (lambda (name) (string-prefix? "obj-" name)))) #t)))) (build-system gnu-build-system) (arguments `(#:out-of-source? #t #:tests? #f #:make-flags (list "--disable-necko-wifi" "--disable-stylo" "--disable-crashreporter" "--disable-updater" "--disable-tests"; Remove if we want to test "--enable-application=browser" "--enable-optimize=-O2" "--with-pthreads" ;; use system libraries "--enable-system-hunspell" "--enable-startup-notification" "--enable-alsa" "--enable-pulseaudio" "--enable-system-sqlite" "--with-system-libevent" "--with-system-libvpx" "--with-system-nspr" "--with-system-nss" "--with-system-icu" "--with-system-graphite2" "--with-system-harfbuzz" "--enable-system-cairo" "--enable-system-ffi" "--enable-system-pixman" "--with-system-bz2" "--with-system-jpeg" "--with-system-png" "--with-system-zlib") #:phases (modify-phases %standard-phases (replace 'configure ;; configure does not work followed by both "SHELL=..." and ;; "CONFIG_SHELL=..."; set environment variables instead (lambda* (#:key outputs configure-flags #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bash (which "bash")) (abs-srcdir (getcwd)) (srcdir (string-append "../" (basename abs-srcdir))) (flags `(,(string-append "--prefix=" out) ,(string-append "--with-l10n-base=" abs-srcdir "/l10n") ,@configure-flags))) (setenv "SHELL" bash) (setenv "CONFIG_SHELL" bash) (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13 (mkdir "../build") (chdir "../build") (format #t "build directory: ~s~%" (getcwd)) (format #t "configure flags: ~s~%" flags) (zero? (apply system* bash (string-append srcdir "/configure") flags)))))))) (inputs `(("alsa-lib" ,alsa-lib) ("bzip2" ,bzip2) ("cairo" ,cairo) ("cups" ,cups) ("dbus-glib" ,dbus-glib) ("gdk-pixbuf" ,gdk-pixbuf) ("glib" ,glib) ("gtk+" ,gtk+) ("gtk+-2" ,gtk+-2) ("pango" ,pango) ("freetype" ,freetype) ("hunspell" ,hunspell) ("libcanberra" ,libcanberra) ("libgnome" ,libgnome) ("libjpeg-turbo" ,libjpeg-turbo) ("libxft" ,libxft) ("libevent" ,libevent-2.0) ("libxinerama" ,libxinerama) ("libxscrnsaver" ,libxscrnsaver) ("libxcomposite" ,libxcomposite) ("libxt" ,libxt) ("libffi" ,libffi) ("ffmpeg" ,ffmpeg) ("libvpx" ,libvpx) ("icu4c" ,icu4c) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) ("mesa" ,mesa) ("nspr" ,nspr) ("nss" ,nss) ("sqlite" ,sqlite) ("startup-notification" ,startup-notification) ("unzip" ,unzip) ("zip" ,zip) ("zlib" ,zlib))) (native-inputs `(("perl" ,perl) ("python" ,python-2) ; Python 3 not supported ("python2-pysqlite" ,python2-pysqlite) ("yasm" ,yasm) ("pkg-config" ,pkg-config) ("autoconf" ,autoconf-2.13) ("which" ,which) ("rust" ,rustc))) (home-page "https://mozilla.org") (synopsis "Web browser") (description "") (license (package-license icecat))))