update firefox (wip)
more/packages/gnuzilla.scm
| 38 | 38 | #:use-module (gnu packages base) | |
| 39 | 39 | #:use-module (gnu packages bison) | |
| 40 | 40 | #:use-module (gnu packages cmake) | |
| 41 | + | #:use-module (gnu packages commencement) | |
| 41 | 42 | #:use-module (gnu packages compression) | |
| 42 | 43 | #:use-module (gnu packages cups) | |
| 43 | 44 | #:use-module (gnu packages curl) | |
| 44 | 45 | #:use-module (gnu packages databases) | |
| 45 | 46 | #:use-module (gnu packages flex) | |
| 46 | 47 | #:use-module (gnu packages fontutils) | |
| 48 | + | #:use-module (gnu packages gcc) | |
| 47 | 49 | #:use-module (gnu packages gl) | |
| 48 | 50 | #:use-module (gnu packages glib) | |
| 49 | 51 | #:use-module (gnu packages gnome) | |
… | |||
| 68 | 70 | #:use-module (gnu packages xorg) | |
| 69 | 71 | #:use-module (ice-9 match)) | |
| 70 | 72 | ||
| 71 | - | (define-public icecat-skia | |
| 72 | - | (package | |
| 73 | - | (inherit icecat) | |
| 74 | - | (name "icecat-skia") | |
| 75 | - | (inputs | |
| 76 | - | `(("skia" ,skia) | |
| 77 | - | ,@(package-inputs icecat))) | |
| 78 | - | (arguments (substitute-keyword-arguments (package-arguments icecat) | |
| 79 | - | ((#:configure-flags flags) | |
| 80 | - | `(cons* "--enable-skia" ,flags)))))) | |
| 73 | + | ;(define-public icecat-skia | |
| 74 | + | ; (package | |
| 75 | + | ; (inherit icecat) | |
| 76 | + | ; (name "icecat-skia") | |
| 77 | + | ; (inputs | |
| 78 | + | ; `(("skia" ,skia) | |
| 79 | + | ; ,@(package-inputs icecat))) | |
| 80 | + | ; (arguments (substitute-keyword-arguments (package-arguments icecat) | |
| 81 | + | ; ((#:configure-flags flags) | |
| 82 | + | ; `(cons* "--enable-skia" ,flags)))))) | |
| 81 | 83 | ||
| 82 | 84 | ;(define-public icu4c-for-firefox | |
| 83 | 85 | ; (package | |
… | |||
| 95 | 97 | ; (sha256 | |
| 96 | 98 | ; (base32 "1zkmbg2932ggvpgjp8pys0cj6z8bw087y8858009shkrjfpzscki")))))) | |
| 97 | 99 | ||
| 98 | - | (define nss-for-firefox | |
| 99 | - | (package | |
| 100 | - | (inherit nss) | |
| 101 | - | (name "nss") | |
| 102 | - | (version "3.34.1") | |
| 103 | - | (source (origin | |
| 104 | - | (method url-fetch) | |
| 105 | - | (uri (let ((version-with-underscores | |
| 106 | - | (string-join (string-split version #\.) "_"))) | |
| 107 | - | (string-append | |
| 108 | - | "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" | |
| 109 | - | "releases/NSS_" version-with-underscores "_RTM/src/" | |
| 110 | - | "nss-" version ".tar.gz"))) | |
| 111 | - | (sha256 | |
| 112 | - | (base32 | |
| 113 | - | "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3")) | |
| 114 | - | ;; Create nss.pc and nss-config. | |
| 115 | - | (patches (search-patches "nss-pkgconfig.patch" | |
| 116 | - | "nss-increase-test-timeout.patch")))))) | |
| 117 | - | (define-public libpng-apng-for-firefox | |
| 118 | - | (package | |
| 119 | - | (inherit libpng-apng) | |
| 120 | - | (name "libpng-apng") | |
| 121 | - | (version "1.6.34") | |
| 122 | - | (source | |
| 123 | - | (origin | |
| 124 | - | (method url-fetch) | |
| 125 | - | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" | |
| 126 | - | version "/libpng-" version ".tar.xz") | |
| 127 | - | (string-append | |
| 128 | - | "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
| 129 | - | "/libpng16/libpng-" version ".tar.xz") | |
| 130 | - | (string-append | |
| 131 | - | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
| 132 | - | "/libpng16/libpng-" version ".tar.xz"))) | |
| 133 | - | (sha256 | |
| 134 | - | (base32 | |
| 135 | - | "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig")))) | |
| 136 | - | (inputs | |
| 137 | - | `(("apng" ,(origin | |
| 138 | - | (method url-fetch) | |
| 139 | - | (uri | |
| 140 | - | (string-append "mirror://sourceforge/libpng-apng/libpng16/" | |
| 141 | - | version "/libpng-" version "-apng.patch.gz")) | |
| 142 | - | (sha256 | |
| 143 | - | (base32 | |
| 144 | - | "1ha4npf9mfrzp0srg8a5amks5ww84xzfpjbsj8k3yjjpai798qg6")))))))) | |
| 100 | + | ;(define nss-for-firefox | |
| 101 | + | ; (package | |
| 102 | + | ; (inherit nss) | |
| 103 | + | ; (name "nss") | |
| 104 | + | ; (version "3.34.1") | |
| 105 | + | ; (source (origin | |
| 106 | + | ; (method url-fetch) | |
| 107 | + | ; (uri (let ((version-with-underscores | |
| 108 | + | ; (string-join (string-split version #\.) "_"))) | |
| 109 | + | ; (string-append | |
| 110 | + | ; "https://ftp.mozilla.org/pub/mozilla.org/security/nss/" | |
| 111 | + | ; "releases/NSS_" version-with-underscores "_RTM/src/" | |
| 112 | + | ; "nss-" version ".tar.gz"))) | |
| 113 | + | ; (sha256 | |
| 114 | + | ; (base32 | |
| 115 | + | ; "186x33wsk4mzjz7dzbn8p0py9a0nzkgzpfkdv4rlyy5gghv5vhd3")) | |
| 116 | + | ; ;; Create nss.pc and nss-config. | |
| 117 | + | ; (patches (search-patches "nss-pkgconfig.patch" | |
| 118 | + | ; "nss-increase-test-timeout.patch")))))) | |
| 119 | + | ;(define-public libpng-apng-for-firefox | |
| 120 | + | ; (package | |
| 121 | + | ; (inherit libpng-apng) | |
| 122 | + | ; (name "libpng-apng") | |
| 123 | + | ; (version "1.6.34") | |
| 124 | + | ; (source | |
| 125 | + | ; (origin | |
| 126 | + | ; (method url-fetch) | |
| 127 | + | ; (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" | |
| 128 | + | ; version "/libpng-" version ".tar.xz") | |
| 129 | + | ; (string-append | |
| 130 | + | ; "ftp://ftp.simplesystems.org/pub/libpng/png/src" | |
| 131 | + | ; "/libpng16/libpng-" version ".tar.xz") | |
| 132 | + | ; (string-append | |
| 133 | + | ; "ftp://ftp.simplesystems.org/pub/libpng/png/src/history" | |
| 134 | + | ; "/libpng16/libpng-" version ".tar.xz"))) | |
| 135 | + | ; (sha256 | |
| 136 | + | ; (base32 | |
| 137 | + | ; "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig")))) | |
| 138 | + | ; (inputs | |
| 139 | + | ; `(("apng" ,(origin | |
| 140 | + | ; (method url-fetch) | |
| 141 | + | ; (uri | |
| 142 | + | ; (string-append "mirror://sourceforge/libpng-apng/libpng16/" | |
| 143 | + | ; version "/libpng-" version "-apng.patch.gz")) | |
| 144 | + | ; (sha256 | |
| 145 | + | ; (base32 | |
| 146 | + | ; "1ha4npf9mfrzp0srg8a5amks5ww84xzfpjbsj8k3yjjpai798qg6")))))))) | |
| 145 | 147 | ||
| 146 | 148 | (define-public sqlite-for-firefox | |
| 147 | 149 | (package | |
| 148 | 150 | (inherit sqlite) | |
| 149 | 151 | (name "sqlite") | |
| 150 | - | (version "3.21.0") | |
| 152 | + | (version "3.25.2") | |
| 151 | 153 | (source (origin | |
| 152 | 154 | (method url-fetch) | |
| 153 | 155 | (uri (let ((numeric-version | |
… | |||
| 159 | 161 | (map (cut string-pad <> 2 #\0) | |
| 160 | 162 | other-digits)) | |
| 161 | 163 | 6 #\0)))))) | |
| 162 | - | (string-append "https://sqlite.org/2017/sqlite-autoconf-" | |
| 164 | + | (string-append "https://sqlite.org/2018/sqlite-autoconf-" | |
| 163 | 165 | numeric-version ".tar.gz"))) | |
| 164 | 166 | (sha256 | |
| 165 | 167 | (base32 | |
| 166 | - | "1qxvzdjwzw6k0kqjfabj86rnq87xdbwbca7laxxdhnh0fmkm3pfp")))))) | |
| 168 | + | "109i1sfryghrdaynkqq9s9aq4347vy653bwkqwx4slix8a2196ns")))) | |
| 169 | + | (arguments | |
| 170 | + | `(#:configure-flags | |
| 171 | + | ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and | |
| 172 | + | ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse | |
| 173 | + | ;; to use the system SQLite unless these options are enabled. | |
| 174 | + | (list "--enable-fts5" "--disable-static" | |
| 175 | + | (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " | |
| 176 | + | "-DSQLITE_ENABLE_UNLOCK_NOTIFY " | |
| 177 | + | "-DSQLITE_ENABLE_DBSTAT_VTAB " | |
| 178 | + | "-DSQLITE_ENABLE_FTS3=1 " | |
| 179 | + | "-DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 " | |
| 180 | + | "-DSQLITE_ENABLE_FTS3_TOKENIZER=1")))))) | |
| 167 | 181 | ||
| 168 | 182 | (define-public firefox | |
| 169 | 183 | (package | |
| 184 | + | (inherit icecat) | |
| 170 | 185 | (name "firefox") | |
| 171 | - | (version "59.0.2") | |
| 186 | + | (version "62.0.3") | |
| 172 | 187 | (source (origin | |
| 173 | 188 | (method url-fetch) | |
| 174 | - | (uri (string-append "https://hg.mozilla.org/releases/mozilla-release/" | |
| 175 | - | "archive/239e434d6d2b8e1e2b697c3416d1e96d48fe98e5.tar.bz2")) | |
| 176 | - | ;(uri (string-append "https://archive.mozilla.org/pub/firefox/" | |
| 177 | - | ; "releases/" version "/source/firefox-" | |
| 178 | - | ; version ".source.tar.xz")) | |
| 189 | + | (uri (string-append "https://archive.mozilla.org/pub/firefox/" | |
| 190 | + | "releases/" version "/source/firefox-" | |
| 191 | + | version ".source.tar.xz")) | |
| 179 | 192 | (sha256 | |
| 180 | 193 | (base32 | |
| 181 | - | "0cr8b6hrhr8ql31w9vjy79gzyzx4d608fwr8bv7apqlp0sn84wsv")) | |
| 194 | + | "0dj6x7mbnq7f1yx2hxzhzgqzazz7hmq5ir5jk0iya98jggmhdmf1")) | |
| 182 | 195 | (file-name (string-append name "-" version ".tar.bz2")) | |
| 183 | - | (modules '((guix build utils))) | |
| 184 | - | (snippet | |
| 185 | - | '(begin | |
| 186 | - | (use-modules (ice-9 ftw)) | |
| 187 | - | ;; Remove bundled libraries that we don't use, since they may | |
| 188 | - | ;; contain unpatched security flaws, they waste disk space and | |
| 189 | - | ;; network bandwidth, and may cause confusion. | |
| 190 | - | (for-each delete-file-recursively | |
| 191 | - | '(;; FIXME: Removing the bundled icu breaks configure. | |
| 192 | - | ;; * The bundled icu headers are used in some places. | |
| 193 | - | ;; * The version number is taken from the bundled copy. | |
| 194 | - | ;;"intl/icu" | |
| 195 | - | ;; | |
| 196 | - | ;; FIXME: A script from the bundled nspr is used. | |
| 197 | - | ;;"nsprpub" | |
| 198 | - | ;; | |
| 199 | - | ;; TODO: Use system media libraries. Waiting for: | |
| 200 | - | ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> | |
| 201 | - | ;; * libogg | |
| 202 | - | ;; * libtheora | |
| 203 | - | ;; * libvorbis | |
| 204 | - | ;; * libtremor (not yet in guix) | |
| 205 | - | ;; * libopus | |
| 206 | - | ;; * speex | |
| 207 | - | ;; * soundtouch (not yet in guix) | |
| 208 | - | ;; | |
| 209 | - | ;; TODO: Use system harfbuzz. Waiting for: | |
| 210 | - | ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=847568> | |
| 211 | - | ;; | |
| 212 | - | ;; TODO: Use system graphite2. | |
| 213 | - | ;; | |
| 214 | - | "modules/freetype2" | |
| 215 | - | "modules/zlib" | |
| 216 | - | "modules/libbz2" | |
| 217 | - | "ipc/chromium/src/third_party/libevent" | |
| 218 | - | "media/libjpeg" | |
| 219 | - | "media/libvpx" | |
| 220 | - | "security/nss" | |
| 221 | - | "gfx/cairo" | |
| 222 | - | "js/src/ctypes/libffi" | |
| 223 | - | "db/sqlite3")) | |
| 224 | - | ;; Delete this file that has incorrect checksums | |
| 225 | - | (for-each delete-file (find-files "." "\\.cargo-checksum.json")) | |
| 226 | - | ;; Delete .pyc files, typically present in icecat source tarballs | |
| 227 | - | (for-each delete-file (find-files "." "\\.pyc$")) | |
| 228 | - | ;; Delete obj-* directories, sometimes present in icecat tarballs | |
| 229 | - | (for-each delete-file-recursively | |
| 230 | - | (scandir "." (lambda (name) | |
| 231 | - | (string-prefix? "obj-" name)))) | |
| 232 | - | #t)))) | |
| 233 | - | (build-system gnu-build-system) | |
| 196 | + | (modules '((guix build utils))) | |
| 197 | + | (snippet | |
| 198 | + | '(begin | |
| 199 | + | (delete-file-recursively "mobile") | |
| 200 | + | #t)))) | |
| 234 | 201 | (arguments | |
| 235 | - | `(#:out-of-source? #t | |
| 236 | - | #:tests? #f | |
| 237 | - | ;#:configure-flags (list "--disable-necko-wifi" | |
| 238 | - | ; "--disable-stylo" | |
| 239 | - | ; "--disable-crashreporter" | |
| 240 | - | ; "--disable-updater" | |
| 241 | - | ; "--disable-tests"; Remove if we want to test | |
| 242 | - | ; "--enable-application=browser" | |
| 243 | - | ; "--enable-optimize=-O2" | |
| 244 | - | ; "--with-pthreads" | |
| 245 | - | ; ;; use system libraries | |
| 246 | - | ; "--enable-system-hunspell" | |
| 247 | - | ; "--enable-startup-notification" | |
| 248 | - | ; "--enable-alsa" "--enable-pulseaudio" | |
| 249 | - | ; "--enable-system-sqlite" | |
| 250 | - | ; "--with-system-libevent" | |
| 251 | - | ; "--with-system-libvpx" | |
| 252 | - | ; "--with-system-nspr" | |
| 253 | - | ; "--with-system-nss" | |
| 254 | - | ; "--with-system-icu" | |
| 255 | - | ; "--enable-system-cairo" | |
| 256 | - | ; "--enable-system-ffi" | |
| 257 | - | ; "--enable-system-pixman" | |
| 258 | - | ; "--with-system-bz2" | |
| 259 | - | ; "--with-system-jpeg" | |
| 260 | - | ; "--with-system-png" | |
| 261 | - | ; "--with-system-zlib") | |
| 262 | - | ; ;; clang is not found because it is assumed to be in | |
| 263 | - | ; ;; the same location as llvm. | |
| 264 | - | ; ;(string-append "--with-clang-path=" | |
| 265 | - | ; ; (assoc-ref %build-inputs "clang-3.9.1") | |
| 266 | - | ; ; "/bin/clang")) | |
| 267 | - | ; ;(string-append "--with-libclang-path=" | |
| 268 | - | ; ; (assoc-ref %build-inputs "clang-3.9.1") | |
| 269 | - | ; ; "/lib")) | |
| 270 | - | ;; Race condition in python? | |
| 271 | - | ;; EOFError: EOF read where object expected | |
| 272 | - | ;#:parallel-build? #f | |
| 273 | - | #:phases | |
| 274 | - | (modify-phases %standard-phases | |
| 275 | - | (replace 'build | |
| 276 | - | (lambda _ | |
| 277 | - | (invoke (which "sh") "mach" "build" "--verbose") | |
| 202 | + | (substitute-keyword-arguments (package-arguments icecat) | |
| 203 | + | ((#:configure-flags cf) | |
| 204 | + | `(list "--enable-default-toolkit=cairo-gtk3" | |
| 205 | + | "--with-distribution-id=org.gnu" | |
| 206 | + | "--enable-startup-notification" | |
| 207 | + | "--enable-pulseaudio" | |
| 208 | + | "--disable-tests" | |
| 209 | + | "--disable-updater" | |
| 210 | + | "--disable-crashreporter" | |
| 211 | + | "--disable-maintenance-service" | |
| 212 | + | ;"--disable-eme" | |
| 213 | + | "--disable-gconf" | |
| 214 | + | ||
| 215 | + | "--disable-debug" | |
| 216 | + | "--disable-debug-symbols" | |
| 217 | + | ||
| 218 | + | (string-append "--with-clang-path=" | |
| 219 | + | (assoc-ref %build-inputs "clang") "/bin/clang") | |
| 220 | + | (string-append "--with-libclang-path=" | |
| 221 | + | (assoc-ref %build-inputs "clang") "/lib") | |
| 222 | + | "--enable-system-sqlite" | |
| 223 | + | "--with-system-libevent" | |
| 224 | + | "--with-system-libvpx" | |
| 225 | + | "--with-system-nspr" | |
| 226 | + | "--with-system-nss" | |
| 227 | + | "--with-system-icu" | |
| 228 | + | "CC=gcc")) | |
| 229 | + | ((#:phases phases) | |
| 230 | + | `(modify-phases ,phases | |
| 231 | + | (delete 'install-desktop-entry) | |
| 232 | + | (delete 'install-icons) | |
| 233 | + | (replace 'patch-cargo-checksums | |
| 234 | + | (lambda _ | |
| 235 | + | (use-modules (guix build cargo-build-system)) | |
| 236 | + | (let ((null-file "/dev/null") | |
| 237 | + | (null-hash "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")) | |
| 238 | + | (substitute* '("Cargo.lock") | |
| 239 | + | (("(\"checksum .* = )\".*\"" all name) | |
| 240 | + | (string-append name "\"" null-hash "\""))) | |
| 241 | + | (let ((checksum-files (find-files "third_party/rust" | |
| 242 | + | ".cargo-checksum.json"))) | |
| 243 | + | (for-each delete-file checksum-files) | |
| 244 | + | (for-each | |
| 245 | + | (lambda (filename) | |
| 246 | + | (let ((dir (dirname filename))) | |
| 247 | + | (display (string-append | |
| 248 | + | "patch-cargo-checksums: generate-checksums for " | |
| 249 | + | dir "\n")) | |
| 250 | + | (generate-checksums dir null-file))) | |
| 251 | + | checksum-files))) | |
| 252 | + | #t)) | |
| 253 | + | (add-after 'unpack 'fix-stylo | |
| 254 | + | (lambda* (#:key inputs #:allow-other-keys) | |
| 255 | + | (substitute* "servo/components/style/build_gecko.rs" | |
| 256 | + | (("builder = builder.include") | |
| 257 | + | (string-append | |
| 258 | + | "builder = builder.clang_arg(\"-I" (assoc-ref inputs "clang") | |
| 259 | + | "/lib/clang/6.0.1/include\"); | |
| 260 | + | builder = builder.include"))) | |
| 278 | 261 | #t)) | |
| 279 | - | (replace 'install | |
| 262 | + | (add-before 'build 'fix-cpath | |
| 280 | 263 | (lambda _ | |
| 281 | - | (invoke (which "sh") "mach" "install") | |
| 264 | + | (setenv "CPATH" (getenv "CPLUS_INCLUDE_PATH")) | |
| 265 | + | (unsetenv "CPLUS_INCLUDE_PATH") | |
| 266 | + | (setenv "CC" "gcc") | |
| 282 | 267 | #t)) | |
| 283 | - | (replace 'configure | |
| 268 | + | (replace | |
| 269 | + | 'configure | |
| 270 | + | ;; configure does not work followed by both "SHELL=..." and | |
| 271 | + | ;; "CONFIG_SHELL=..."; set environment variables instead | |
| 284 | 272 | (lambda* (#:key outputs configure-flags #:allow-other-keys) | |
| 285 | - | (setenv "SHELL" (which "bash")) | |
| 286 | - | (with-output-to-file "mozconfig" | |
| 287 | - | (lambda _ | |
| 288 | - | (display (string-append | |
| 289 | - | "ac_add_options --disable-necko-wifi | |
| 290 | - | ac_add_options --enable-system-hunspell | |
| 291 | - | ac_add_options --enable-startup-notification | |
| 292 | - | ac_add_options --enable-system-sqlite | |
| 293 | - | ac_add_options --with-system-libevent | |
| 294 | - | ac_add_options --with-system-libvpx | |
| 295 | - | ac_add_options --with-system-nspr | |
| 296 | - | ac_add_options --with-system-nss | |
| 297 | - | ac_add_options --with-system-icu | |
| 298 | - | ac_add_options --prefix=" (assoc-ref outputs "out") " | |
| 299 | - | ac_add_options --enable-application=browser | |
| 300 | - | ||
| 301 | - | # For now, disable stylo: it requires clang which is not found by llvm-config | |
| 302 | - | ac_add_options --disable-stylo | |
| 303 | - | ||
| 304 | - | ac_add_options --disable-crashreporter | |
| 305 | - | ac_add_options --disable-updater | |
| 306 | - | # enabling the tests will use a lot more space and significantly | |
| 307 | - | # increase the build time, for no obvious benefit. | |
| 308 | - | ac_add_options --disable-tests | |
| 309 | - | ||
| 310 | - | # Optimization for size is broken with gcc7 | |
| 311 | - | ac_add_options --enable-optimize=\"-O2\" | |
| 312 | - | ||
| 313 | - | ac_add_options --enable-official-branding | |
| 314 | - | ||
| 315 | - | # In firefox-59.0 system cairo breaks the build, so comment it. | |
| 316 | - | #ac_add_options --enable-system-cairo | |
| 317 | - | ac_add_options --enable-system-ffi | |
| 318 | - | ac_add_options --enable-system-pixman | |
| 319 | - | ||
| 320 | - | ac_add_options --with-pthreads | |
| 321 | - | ||
| 322 | - | ac_add_options --with-system-bz2 | |
| 323 | - | ac_add_options --with-system-jpeg | |
| 324 | - | ac_add_options --with-system-png | |
| 325 | - | ac_add_options --with-system-zlib | |
| 326 | - | ||
| 327 | - | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir | |
| 328 | - | "))))))))) | |
| 329 | - | ;(let* ((out (assoc-ref outputs "out")) | |
| 330 | - | ; (bash (which "bash")) | |
| 331 | - | ; (abs-srcdir (getcwd)) | |
| 332 | - | ; (srcdir (string-append "../" (basename abs-srcdir))) | |
| 333 | - | ; (flags `(,(string-append "--prefix=" out) | |
| 334 | - | ; ,(string-append "--with-l10n-base=" | |
| 335 | - | ; abs-srcdir "/intl/l10n") | |
| 336 | - | ; ,@configure-flags))) | |
| 337 | - | ; ;; We removed the embedded sqlite, so don't reference it. | |
| 338 | - | ; (substitute* '("storage/moz.build" "dom/indexedDB/moz.build") | |
| 339 | - | ; (("'/db/sqlite3/src',") "")) | |
| 340 | - | ; (setenv "SHELL" bash) | |
| 341 | - | ; (setenv "CONFIG_SHELL" bash) | |
| 342 | - | ; (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13 | |
| 343 | - | ; (mkdir "../build") | |
| 344 | - | ; (chdir "../build") | |
| 345 | - | ; (format #t "build directory: ~s~%" (getcwd)) | |
| 346 | - | ; (format #t "configure flags: ~s~%" flags) | |
| 347 | - | ; (zero? (apply system* bash | |
| 348 | - | ; (string-append srcdir "/configure") | |
| 349 | - | ; flags)))))))) | |
| 273 | + | (let* ((out (assoc-ref outputs "out")) | |
| 274 | + | (bash (which "bash")) | |
| 275 | + | (abs-srcdir (getcwd)) | |
| 276 | + | (srcdir (string-append "../" (basename abs-srcdir))) | |
| 277 | + | (flags `(,(string-append "--prefix=" out) | |
| 278 | + | ;,(string-append "--with-l10n-base=" | |
| 279 | + | ; abs-srcdir "/intl/l10n") | |
| 280 | + | ,@configure-flags))) | |
| 281 | + | (setenv "SHELL" bash) | |
| 282 | + | (setenv "CONFIG_SHELL" bash) | |
| 283 | + | (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13 | |
| 284 | + | (mkdir "../build") | |
| 285 | + | (chdir "../build") | |
| 286 | + | (format #t "build directory: ~s~%" (getcwd)) | |
| 287 | + | (format #t "configure flags: ~s~%" flags) | |
| 288 | + | (apply invoke bash | |
| 289 | + | (string-append srcdir "/configure") | |
| 290 | + | flags)))))))) | |
| 350 | 291 | (inputs | |
| 351 | - | `(("alsa-lib" ,alsa-lib) | |
| 352 | - | ("bzip2" ,bzip2) | |
| 353 | - | ("cairo" ,cairo) | |
| 354 | - | ("cups" ,cups) | |
| 355 | - | ("dbus-glib" ,dbus-glib) | |
| 356 | - | ("gdk-pixbuf" ,gdk-pixbuf) | |
| 357 | - | ("glib" ,glib) | |
| 358 | - | ("gtk+" ,gtk+) | |
| 359 | - | ("gtk+-2" ,gtk+-2) | |
| 360 | - | ("pango" ,pango) | |
| 361 | - | ("freetype" ,freetype) | |
| 362 | - | ("hunspell" ,hunspell) | |
| 363 | - | ("libcanberra" ,libcanberra) | |
| 364 | - | ("libgnome" ,libgnome) | |
| 365 | - | ("libjpeg-turbo" ,libjpeg-turbo) | |
| 366 | - | ("libxft" ,libxft) | |
| 367 | - | ("libevent" ,libevent-2.0) | |
| 368 | - | ("libxinerama" ,libxinerama) | |
| 369 | - | ("libxscrnsaver" ,libxscrnsaver) | |
| 370 | - | ("libxcomposite" ,libxcomposite) | |
| 371 | - | ("libxt" ,libxt) | |
| 372 | - | ("libffi" ,libffi) | |
| 373 | - | ("ffmpeg" ,ffmpeg) | |
| 374 | - | ("libpng-apng" ,libpng-apng-for-firefox) | |
| 375 | - | ("libvpx" ,libvpx) | |
| 376 | - | ("icu4c" ,icu4c) | |
| 377 | - | ("pixman" ,pixman) | |
| 378 | - | ("pulseaudio" ,pulseaudio) | |
| 379 | - | ("mesa" ,mesa) | |
| 380 | - | ("nspr" ,nspr) | |
| 381 | - | ("nss" ,nss-for-firefox) | |
| 292 | + | `(("nspr" ,nspr) | |
| 293 | + | ("nss" ,nss) | |
| 382 | 294 | ("sqlite" ,sqlite-for-firefox) | |
| 383 | - | ("startup-notification" ,startup-notification) | |
| 384 | - | ("unzip" ,unzip) | |
| 385 | - | ("zip" ,zip) | |
| 386 | - | ("zlib" ,zlib))) | |
| 295 | + | ,@(alist-delete "sqlite" (package-inputs icecat)))) | |
| 387 | 296 | (native-inputs | |
| 388 | - | `(("perl" ,perl) | |
| 389 | - | ("python" ,python-2) ; Python 3 not supported | |
| 390 | - | ("python2-pysqlite" ,python2-pysqlite) | |
| 391 | - | ("yasm" ,yasm) | |
| 392 | - | ("pkg-config" ,pkg-config) | |
| 393 | - | ("autoconf" ,autoconf-2.13) | |
| 394 | - | ("which" ,which) | |
| 395 | - | ("rust" ,rust) | |
| 396 | - | ("cargo" ,rust "cargo") | |
| 397 | - | ("libtool" ,libtool) | |
| 398 | - | ("clang-3.9.1" ,clang-3.9.1) | |
| 399 | - | ("llvm-3.9.1" ,llvm-3.9.1))) | |
| 400 | - | (home-page "https://mozilla.org") | |
| 401 | - | (synopsis "Web browser") | |
| 402 | - | (description "") | |
| 403 | - | (license (package-license icecat)))) | |
| 297 | + | `(("gcc" ,gcc-6) | |
| 298 | + | ("gcc-toolchain-6" ,gcc-toolchain-6) | |
| 299 | + | ("python-3" ,python-3) | |
| 300 | + | ("clang" ,clang) | |
| 301 | + | ("llvm" ,llvm) | |
| 302 | + | ,@(package-native-inputs icecat))))) | |
| 303 | + | ;(snippet | |
| 304 | + | ; '(begin | |
| 305 | + | ; (use-modules (ice-9 ftw)) | |
| 306 | + | ; ;; Remove bundled libraries that we don't use, since they may | |
| 307 | + | ; ;; contain unpatched security flaws, they waste disk space and | |
| 308 | + | ; ;; network bandwidth, and may cause confusion. | |
| 309 | + | ; (for-each delete-file-recursively | |
| 310 | + | ; '(;; FIXME: Removing the bundled icu breaks configure. | |
| 311 | + | ; ;; * The bundled icu headers are used in some places. | |
| 312 | + | ; ;; * The version number is taken from the bundled copy. | |
| 313 | + | ; ;;"intl/icu" | |
| 314 | + | ; ;; | |
| 315 | + | ; ;; FIXME: A script from the bundled nspr is used. | |
| 316 | + | ; ;;"nsprpub" | |
| 317 | + | ; ;; | |
| 318 | + | ; ;; TODO: Use system media libraries. Waiting for: | |
| 319 | + | ; ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422> | |
| 320 | + | ; ;; * libogg | |
| 321 | + | ; ;; * libtheora | |
| 322 | + | ; ;; * libvorbis | |
| 323 | + | ; ;; * libtremor (not yet in guix) | |
| 324 | + | ; ;; * libopus | |
| 325 | + | ; ;; * speex | |
| 326 | + | ; ;; * soundtouch (not yet in guix) | |
| 327 | + | ; ;; | |
| 328 | + | ; ;; TODO: Use system harfbuzz. Waiting for: | |
| 329 | + | ; ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=847568> | |
| 330 | + | ; ;; | |
| 331 | + | ; ;; TODO: Use system graphite2. | |
| 332 | + | ; ;; | |
| 333 | + | ; "modules/freetype2" | |
| 334 | + | ; "modules/zlib" | |
| 335 | + | ; "modules/libbz2" | |
| 336 | + | ; "ipc/chromium/src/third_party/libevent" | |
| 337 | + | ; "media/libjpeg" | |
| 338 | + | ; "media/libvpx" | |
| 339 | + | ; "security/nss" | |
| 340 | + | ; "gfx/cairo" | |
| 341 | + | ; "js/src/ctypes/libffi" | |
| 342 | + | ; "db/sqlite3")) | |
| 343 | + | ; ;; Delete this file that has incorrect checksums | |
| 344 | + | ; (for-each delete-file (find-files "." "\\.cargo-checksum.json")) | |
| 345 | + | ; ;; Delete .pyc files, typically present in icecat source tarballs | |
| 346 | + | ; (for-each delete-file (find-files "." "\\.pyc$")) | |
| 347 | + | ; ;; Delete obj-* directories, sometimes present in icecat tarballs | |
| 348 | + | ; (for-each delete-file-recursively | |
| 349 | + | ; (scandir "." (lambda (name) | |
| 350 | + | ; (string-prefix? "obj-" name)))) | |
| 351 | + | ; #t)))))) | |