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, 2017 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
8 ;;; Copyright © 2017 Clément Lassieur <clement@lassieur.org>
10 ;;; This file is part of GNU Guix.
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.
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.
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/>.
25 (define-module (gnu packages gnuzilla)
26 #:use-module ((srfi srfi-1) #:hide (zip))
27 #:use-module (ice-9 match)
28 #:use-module (gnu packages)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix utils)
33 #:use-module (guix build-system gnu)
34 #:use-module (gnu packages autotools)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages databases)
37 #:use-module (gnu packages glib)
38 #:use-module (gnu packages gtk)
39 #:use-module (gnu packages gnome)
40 #:use-module (gnu packages libcanberra)
41 #:use-module (gnu packages cups)
42 #:use-module (gnu packages kerberos)
43 #:use-module (gnu packages linux)
44 #:use-module (gnu packages perl)
45 #:use-module (gnu packages pkg-config)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages fontutils)
48 #:use-module (gnu packages libevent)
49 #:use-module (gnu packages libreoffice) ;for hunspell
50 #:use-module (gnu packages image)
51 #:use-module (gnu packages libffi)
52 #:use-module (gnu packages pulseaudio)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages xorg)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages assembly)
57 #:use-module (gnu packages icu4c)
58 #:use-module (gnu packages video)
59 #:use-module (gnu packages xdisorg)
60 #:use-module (gnu packages zip))
69 "https://ftp.mozilla.org/pub/mozilla.org/js/"
70 name version ".tar.gz"))
73 "1fig2wf4f10v43mqx67y68z6h77sy900d1w0pz9qarrqx57rc7ij"))
74 (patches (search-patches "mozjs17-aarch64-support.patch"))
75 (modules '((guix build utils)))
77 ;; Fix incompatibility with Perl 5.22+.
78 '(substitute* '("js/src/config/milestone.pl")
79 (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
80 (build-system gnu-build-system)
83 ("pkg-config" ,pkg-config)
84 ("python" ,python-2)))
86 `(("nspr" ,nspr))) ; in the Requires.private field of mozjs-17.0.pc
90 `(;; XXX: parallel build fails, lacking:
91 ;; mkdir -p "system_wrapper_js/"
94 (modify-phases %standard-phases
95 (add-after 'unpack 'delete-timedout-test
96 ;; This test times out on slower hardware.
97 (lambda _ (delete-file "js/src/jit-test/tests/basic/bug698584.js")))
98 (add-before 'configure 'chdir
103 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
104 (lambda* (#:key outputs #:allow-other-keys)
105 (let ((out (assoc-ref outputs "out")))
106 (setenv "SHELL" (which "sh"))
107 (setenv "CONFIG_SHELL" (which "sh"))
109 "./configure" (string-append "--prefix=" out)
110 ,@(if (string=? "aarch64-linux"
112 '("--host=aarch64-unknown-linux-gnu")
115 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey")
116 (synopsis "Mozilla javascript engine")
117 (description "SpiderMonkey is Mozilla's JavaScript engine written
119 (license license:mpl2.0))) ; and others for some files
121 (define-public mozjs-24
122 (package (inherit mozjs)
128 "https://ftp.mozilla.org/pub/mozilla.org/js/"
129 name "-" version ".tar.bz2"))
132 "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"))
133 (modules '((guix build utils)))
134 (patches (search-patches "mozjs24-aarch64-support.patch"))
136 ;; Fix incompatibility with Perl 5.22+.
137 '(substitute* '("js/src/config/milestone.pl")
138 (("defined\\(@TEMPLATE_FILE)") "@TEMPLATE_FILE")))))
140 (substitute-keyword-arguments (package-arguments mozjs)
142 `(modify-phases ,phases
144 (lambda* (#:key outputs #:allow-other-keys)
145 (let ((out (assoc-ref outputs "out")))
146 ;; configure fails if it is followed by SHELL and CONFIG_SHELL
147 (setenv "SHELL" (which "sh"))
148 (setenv "CONFIG_SHELL" (which "sh"))
149 (zero? (system* "./configure"
150 (string-append "--prefix=" out)
152 "--enable-system-ffi"
153 "--enable-threadsafe"
154 ,@(if (string=? "aarch64-linux"
156 '("--host=aarch64-unknown-linux-gnu")
169 "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v"
170 version "/src/nspr-" version ".tar.gz"))
173 "1m8p9l3prabhfxz6zs889fl7gmcka72a62i46a8klh2pca11iz34"))))
174 (build-system gnu-build-system)
178 `(#:tests? #f ; no check target
179 #:configure-flags (list "--enable-64bit"
180 (string-append "LDFLAGS=-Wl,-rpath="
181 (assoc-ref %outputs "out")
183 #:phases (modify-phases %standard-phases
184 (add-before 'configure 'chdir
185 (lambda _ (chdir "nspr") #t)))))
187 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSPR")
188 (synopsis "Netscape API for system level and libc-like functions")
189 (description "Netscape Portable Runtime (NSPR) provides a
190 platform-neutral API for system level and libc-like functions. It is used
191 in the Mozilla clients.")
192 (license license:mpl2.0)))
200 (uri (let ((version-with-underscores
201 (string-join (string-split version #\.) "_")))
203 "https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
204 "releases/NSS_" version-with-underscores "_RTM/src/"
205 "nss-" version ".tar.gz")))
208 "096frzvyp3z257x84rxknscfgsbavzh2a0gyibx7kvmw4vzpfjhd"))
209 ;; Create nss.pc and nss-config.
210 (patches (search-patches "nss-pkgconfig.patch"
211 "nss-disable-long-b64-tests.patch"
212 "nss-increase-test-timeout.patch"))))
213 (build-system gnu-build-system)
214 (outputs '("out" "bin"))
216 `(#:parallel-build? #f ; not supported
218 (let* ((out (assoc-ref %outputs "out"))
219 (nspr (string-append (assoc-ref %build-inputs "nspr")))
220 (rpath (string-append "-Wl,-rpath=" out "/lib/nss")))
221 (list "-C" "nss" (string-append "PREFIX=" out)
223 "NSS_USE_SYSTEM_SQLITE=1"
224 (string-append "NSPR_INCLUDE_DIR=" nspr "/include/nspr")
225 ;; Add $out/lib/nss to RPATH.
226 (string-append "RPATH=" rpath)
227 (string-append "LDFLAGS=" rpath)))
228 #:modules ((guix build gnu-build-system)
234 (modify-phases %standard-phases
238 ;; Tells NSS to build for the 64-bit ABI if we are 64-bit system.
239 ,@(match (%current-system)
240 ((or "x86_64-linux" "aarch64-linux")
241 `((setenv "USE_64" "1")))
247 ;; Use 127.0.0.1 instead of $HOST.$DOMSUF as HOSTADDR for testing.
248 ;; The later requires a working DNS or /etc/hosts.
249 (setenv "DOMSUF" "(none)")
250 (setenv "USE_IP" "TRUE")
251 (setenv "IP_ADDRESS" "127.0.0.1")
252 (zero? (system* "./nss/tests/all.sh"))))
254 (lambda* (#:key outputs #:allow-other-keys)
255 (let* ((out (assoc-ref outputs "out"))
256 (bin (string-append (assoc-ref outputs "bin") "/bin"))
257 (inc (string-append out "/include/nss"))
258 (lib (string-append out "/lib/nss"))
259 (obj (match (scandir "dist" (cut string-suffix? "OBJ" <>))
260 ((obj) (string-append "dist/" obj)))))
261 ;; Install nss-config to $out/bin.
262 (install-file (string-append obj "/bin/nss-config")
263 (string-append out "/bin"))
264 (delete-file (string-append obj "/bin/nss-config"))
265 ;; Install nss.pc to $out/lib/pkgconfig.
266 (install-file (string-append obj "/lib/pkgconfig/nss.pc")
267 (string-append out "/lib/pkgconfig"))
268 (delete-file (string-append obj "/lib/pkgconfig/nss.pc"))
269 (rmdir (string-append obj "/lib/pkgconfig"))
270 ;; Install other files.
271 (copy-recursively "dist/public/nss" inc)
272 (copy-recursively (string-append obj "/bin") bin)
273 (copy-recursively (string-append obj "/lib") lib)
275 ;; FIXME: libgtest1.so is installed in the above step, and it's
276 ;; (unnecessarily) linked with several NSS libraries, but
277 ;; without the needed rpaths, causing the 'validate-runpath'
278 ;; phase to fail. Here we simply delete libgtest1.so, since it
279 ;; seems to be used only during the tests.
280 (delete-file (string-append lib "/libgtest1.so"))
286 (propagated-inputs `(("nspr" ,nspr))) ; required by nss.pc.
287 (native-inputs `(("perl" ,perl)))
289 ;; The NSS test suite takes around 48 hours on Loongson 3A (MIPS) when
290 ;; another build is happening concurrently on the same machine.
291 (properties '((timeout . 216000))) ; 60 hours
294 "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
295 (synopsis "Network Security Services")
297 "Network Security Services (NSS) is a set of libraries designed to support
298 cross-platform development of security-enabled client and server applications.
299 Applications built with NSS can support SSL v2 and v3, TLS, PKCS #5, PKCS #7,
300 PKCS #11, PKCS #12, S/MIME, X.509 v3 certificates, and other security
302 (license license:mpl2.0)))
304 (define (mozilla-patch file-name changeset hash)
305 "Return an origin for CHANGESET from the mozilla-esr52 repository."
308 (uri (string-append "https://hg.mozilla.org/releases/mozilla-esr52/raw-rev/"
310 (sha256 (base32 hash))
311 (file-name file-name)))
313 (define-public icecat
316 (version "52.0.2-gnu1")
320 (uri (string-append "mirror://gnu/gnuzilla/"
321 (first (string-split version #\-))
322 "/" name "-" version ".tar.bz2"))
325 "0asaba04y6rwc7nx898p89jdxkbnsb3dxjvpdi8xb1rbgyms80c9"))
328 (search-patch "icecat-avoid-bundled-libraries.patch")
329 (mozilla-patch "icecat-CVE-2017-5443.patch" "6daaaff9f1f6" "0jvb6y5fiwr13fyx58k49n81kv6h03vcch502g57y6nsx2wsqng6")
330 (mozilla-patch "icecat-bug-1319087.patch" "82297fcc6f19" "02qcbg2r2smswgnwj7fs5bcrr3rlqbpsh2nmcbsjyblp5fk1ag36")
331 (mozilla-patch "icecat-CVE-2017-5429-pt01.patch" "dd526ebe7e58" "1rj0pz6iql59zrynz48njcfg8i0v55bjdndplss9wl37lfydl7ca")
332 (mozilla-patch "icecat-CVE-2017-5447-pt1.patch" "3bc981f85a17" "0am9k3mii2r05lp6xpizxp356mb8xrbqs9kmx0wx5wyy08wjzmks")
333 (mozilla-patch "icecat-CVE-2017-5447-pt2.patch" "4f752b0e5920" "183s5dwzd57b299grvyvn139fsp9am0smd3yb4shw8g0iwzz61nf")
334 (mozilla-patch "icecat-CVE-2017-5449.patch" "1714eda3de9b" "0ncngdpzvffvpw4c1mi0dda5l02lwyil4rnq3i6salnwlrq9x32z")
335 (mozilla-patch "icecat-CVE-2017-5455.patch" "b10922304d81" "0rglbavb8rx7hl53ksgypazz27263b1yn97gznpdsq89zhirfw3m")
336 (mozilla-patch "icecat-CVE-2017-5446.patch" "d98de46f8f27" "040agykr4w4wsbi0xm3rrrjxk48iwz8l1hn11vfv45nzsx2f1hzq")
337 ;; The next patch is for CVE-2017-5436 in the bundled graphite2.
338 ;; TODO: apply additional fixes from our system graphite2 to the
339 ;; bundled copy, or upgrade it in place.
340 (mozilla-patch "icecat-CVE-2017-5436.patch" "e6132f638311" "07w9pijx42psgmkj2i6i87lf30gl0yyb5caz6wz7fm8phi8wwy9p")
341 (mozilla-patch "icecat-bug-1342395.patch" "0e0e8abe2153" "1xlnq2fd50kf0rz9dibz5vlaa9zj2pifjvky2fdykcan62xz75hy")
342 (mozilla-patch "icecat-bug-1342841.patch" "623afac083f8" "1pv86j0dxdmi7g3rx4zqplz4gxq5lfyzpdssq83naypcxic6zafb")
343 (mozilla-patch "icecat-bug-1344644.patch" "cac0735c228f" "0695f0hvxnzgcirgxx3axn5nhkywqxjcvnrlhg7jwfann4mnbsfn")
344 (mozilla-patch "icecat-bug-1322660.patch" "9d6d60e64255" "0ds74ilhyc9qkkjgkm0xk7ay3926971rzwfh2avhhkfargn7idib")
345 (mozilla-patch "icecat-bug-1343330.patch" "6f23bd449bc7" "1igz6yhx803hygf7cii8bchx7bfw1niq8s0nc5l9i5rb8ml2b7f0")
346 (mozilla-patch "icecat-bug-1346961.patch" "3a2dc54cf986" "0dfp3s7d43zx3svajbkhvi73b71hhr7vrc9yz0iz37pykg40c4hn")
347 (mozilla-patch "icecat-bug-1318070.patch" "a68d6d9b87d0" "1yqgkgv7i0xy5dm0pgg1cbav4qglsdk8brzcjcpfz65bmn1pqrhh")
348 (mozilla-patch "icecat-CVE-2017-5448.patch" "6684a3c7f834" "0agyynvcjk28d7l2l4cqz67ddg9xw7ymiirb0npabd1si9zj27xb")
349 (mozilla-patch "icecat-bug-1336345.patch" "590416f46ec8" "1q2svqjd735rickr9i3kdkd0la6ikdphhmzr19h1r84nrl6a87ia")
350 (mozilla-patch "icecat-bug-1336356.patch" "00ba83ac39be" "1h6qsfv4r9mlc2ihjm9kmzi76aijdnnyx1g2r30ia87xha106pnk")
351 (mozilla-patch "icecat-bug-1342363.patch" "10285b4a6b71" "0l2ww19y6qbarcp9brjgbpf4vi3k38r6ak8is5736vqz0c17dim0")
352 (mozilla-patch "icecat-bug-1343787.patch" "28287b7f0938" "1w85s9rqh0dyfx6qn5plypbypz9casig03b6yiy9bpiq7ckrxz56")
353 (mozilla-patch "icecat-bug-1292803.patch" "adbf7b59a405" "1l1p0b5rc05czk6kr3k3k99m1fkwphj2jrd092gdbib8q4m4cvzv")
354 (mozilla-patch "icecat-bug-1313869.patch" "eba25396310b" "1ws0dr0kwclzbc2m0sihd3aqvbbg57ycia0fg6y294k6qipcxv38")
355 (mozilla-patch "icecat-bug-1141756-pt1.patch" "f7c262517722" "0r1zzbxf47q5w8vcy402yin105ngam3csb2q7h7n8axm97307ykp")
356 (mozilla-patch "icecat-bug-1141756-pt2.patch" "420396d5e26d" "0yv1pmpydzkirfwrxrgbw98dm4a9a4s0izha0wabrp4lb3655jv5")
357 (mozilla-patch "icecat-bug-1343210.patch" "ed9521749d6f" "1j2zzi00qyqjgh15ingvl6f88zlk4imp31m5jmf7w5f9jqi5ly3k")
358 (mozilla-patch "icecat-bug-1342442.patch" "775b6f85ef81" "00h9dgds7jv9n4cznj5qhh8liaf1b3wvnlqc2z7a3kj07ijllwzb")
359 (mozilla-patch "icecat-bug-1344527.patch" "d4612b14c907" "1n3a0mp351a7xgvshm6688gh89hg0xci3y621zs2pyqsfm114366")
360 (mozilla-patch "icecat-CVE-2017-5442.patch" "5f1aa2336998" "1y2marhrglc66vchd6z0jdmhg0pmkxp1cwim63bp9l6pj7lxyjma")
361 (mozilla-patch "icecat-CVE-2017-5430-pt01.patch" "512604631b23" "171nzxr4av4818d0fyg9hcsdxkai61sghl45xnsr2al34l28wsw3")
362 (mozilla-patch "icecat-CVE-2017-5430-pt02.patch" "16772200ad6f" "087j16rcbs5kgvpa096kd6jarwwwfrhwph54wzjn671wr1vnsvvd")
363 (mozilla-patch "icecat-CVE-2017-5441.patch" "c744e9d57250" "0m70157lczf17hxb2pabsl3grhcjqallbdfpsd58q8q6fk99k6x3")
364 (mozilla-patch "icecat-CVE-2017-5433.patch" "b4fc7a4cb5e0" "12q6mr5prpgqg5xnrww09qjm3jx2amb8zig62cd46ba8n9z2j9ab")
365 (mozilla-patch "icecat-CVE-2017-5429-pt02.patch" "21eac0b4fd2f" "1a6v0hwcc26gnlxygplc11dfzc8bykhh44j4gsz88kl5c5jqhlk9")
366 (mozilla-patch "icecat-CVE-2017-5432.patch" "62df7046e959" "1qvxbpkf87g4vnl8hxqvwb1ydrpkqq3rbkivr8q4029rvgalf4rf")
367 (mozilla-patch "icecat-bug-1350599.patch" "f6a978b2fcec" "0rkbbmw52mxgrmn1xny4jkn3slwb5jsqs4yr07ffhz7r801jy9iz")
368 (mozilla-patch "icecat-bug-1332839.patch" "2ad0f87f5dba" "04458jidri521hgf3r63pl736zz4gmgv6b8spa32anfb7gryj8fy")
369 (mozilla-patch "icecat-bug-1337548.patch" "29a1ad09a6ec" "0pld81bpc34w6g2ara54sx30msas55kwzr537pvxxc002lpvzs57")
370 (mozilla-patch "icecat-CVE-2017-5430-pt03.patch" "5dec7534760f" "1xh0y7srl7nznb6szpfiykd6r1ibyxrdvasc36w0chqjdmq7xr32")
371 (mozilla-patch "icecat-bug-1343851.patch" "e104d53316d7" "1yhv3qvzzi3kr881ji1dnm8ydnr3snh2vzl3c4vdzmvrjx8q5rcb")
372 (mozilla-patch "icecat-bug-1345222.patch" "864644fadcb0" "0qpplxyfn87bigzdkwlrhj9isd5gfafhjgqfckb239a09wwrblf3")
373 (mozilla-patch "icecat-bug-1348584.patch" "7cee9ad555af" "0856bpa3n71a3y5m4gilcdb9ghb60p545xkv9zbr245r20mj32ds")
374 (mozilla-patch "icecat-bug-1346720.patch" "6a597a9cd494" "091a5sanw3w3gl0jcmf8d60m59vwbh5v36vnar20m0hl7xrv4v7p")
375 (mozilla-patch "icecat-CVE-2017-5430-pt04.patch" "09693629803f" "18fhmsghq0232mhh8j10cy0a4979nmkbh43jlcyrg3l63l7795k4")
376 (mozilla-patch "icecat-CVE-2017-5430-pt05.patch" "2b8268ea97a9" "0l0f54krxdmqbgldikwjncxvn6irihcljldd3z039himrvplisjg")
377 (mozilla-patch "icecat-bug-1347700-pt1.patch" "ee706896916c" "0m85x80y98c154hyis08kcy81kbw3v34na1v862vxzs939d3mc0n")
378 (mozilla-patch "icecat-bug-1347700-pt2.patch" "08ecc2d92f81" "1s6411ccifw9l22hhmf32nhm8r5hbclnhy7jm2n228sqfr4h971g")
379 (mozilla-patch "icecat-bug-1337682.patch" "15af6a323161" "1nxbwd0574gscnkxfyhzv3yqvxiccb2d0rmba9vi6i62646l2pd5")
380 (mozilla-patch "icecat-CVE-2017-5451.patch" "d91260f0069a" "15w4rzz51hps2fr8djf5z1rzdwxshclk936mxv5anx1skkwms0y8")
381 (mozilla-patch "icecat-CVE-2017-5444.patch" "7740cf7e121b" "1706mx4zmnib336p2wmfp9ncyl66lk2da82f28xvcw262mg1c8lw")
382 (mozilla-patch "icecat-bug-1347164-pt1.patch" "b35a6d6dcdca" "077r0pns58fw3xd3qnbhib4q21vvw0aynpa8iyn1pycg8mppmd0f")
383 (mozilla-patch "icecat-bug-1347164-pt2.patch" "a42fc05969b9" "1ijq8ccsk5k56h77sv5kqv48w7csj3vbakzq98awgbvypzfdyhss")
384 (mozilla-patch "icecat-bug-1347164-pt3.patch" "f78ac1ac0a37" "0kj6jq482cqwyngy1kmb69zpq35xah8h33kml8i4l7andiyaq3zm")
385 (mozilla-patch "icecat-bug-1347164-pt4.patch" "795a3d48a775" "18lw99hmrr93k95hk6v6bx5rcf22aa902x2yf5p6wxdqg56nc0zp")
386 (mozilla-patch "icecat-bug-1338699.patch" "94ce63191069" "0rdivablincah3gbgl4wzjmqlraazivmr8bhqxdpy8dk0a6fvv4s")
387 (mozilla-patch "icecat-bug-1342301.patch" "e640e758a7cd" "17f36vvf82n6shlaip7ji8qsy9861f9a5r79h000p3wb3bb7lbfs")
388 (mozilla-patch "icecat-bug-1342170.patch" "df7ed78b7c0a" "1kq256i66hcm2k9d37i5ws354ksv3bbglmscdjv2v5f7wg3y967v")
389 (mozilla-patch "icecat-bug-1342634.patch" "d72e56823bbb" "0c186d77lyyg0hjxw15d44rybw6yr5aw8g9m3311xfdn5wiygijb")
390 (mozilla-patch "icecat-bug-1348796-pt1.patch" "cef01720769e" "0h57372lxanjs5zw9b3vwr2x36yz9gj73swyg50aqp13j4rcbpmy")
391 (mozilla-patch "icecat-bug-1348796-pt2.patch" "7d3584b75f20" "1a4hvpsvn39832g54hsxhqs24cq8v4nd69jqskkgc1ybs09ncmr3")
392 (mozilla-patch "icecat-bug-1192800.patch" "e56b0938ea0f" "1hlbxhjzj65s6p2v6f66zdfb3gw5yx77msgq5idsv9jip2w88mpq")
393 (mozilla-patch "icecat-bug-1309438.patch" "1f30d97563c8" "0rvq729fg9j959ha9qvw5wv7r6vw70qvpy7ynifgqhgrpa749n70")
394 (mozilla-patch "icecat-bug-1315332.patch" "66495c8d9459" "0vzlx8i0cidpymm6ar07h3yk63fxf64f0b2vb0pihd72h0jzd5s9")
395 (mozilla-patch "icecat-bug-1346439.patch" "a9fcc2dc324a" "13991jijwa84yczkmc212s23w269r8b1a4yiygqgwaily29l1dc5")
396 (mozilla-patch "icecat-CVE-2017-5469.patch" "3dcc5f5c2df4" "0b36m6rgxc05h39l6wkzi6dlmq9brcigk7xjrifs4786f0z564hz")
397 (mozilla-patch "icecat-CVE-2017-5430-pt06.patch" "ac0ca89b5a6b" "1646y9y2wmq8pxb081x3076dq9ana7hh5fxwbsnn17v5wqhi8gfb")
398 (mozilla-patch "icecat-CVE-2017-5467.patch" "6ed26e6c1a09" "0r1n1dwb4l8xwlns0aifyka6mldb6cy2crhh2qkap64cpj3bzl9s")
399 (mozilla-patch "icecat-CVE-2017-5439.patch" "2fde528ca7b6" "0iv0sjhnh7br0z3pcpk346wbj162ynacfk3p9309hg6kr1cd92fp")
400 (mozilla-patch "icecat-CVE-2017-5440.patch" "d88bd03d1234" "1pls63djh4w5023ag3fwjk79cpx816ilgajl5l1qlqyacl8c0v4p")
401 (mozilla-patch "icecat-bug-1349987.patch" "3282e8f6a121" "1dyc84h7v0l9gndmbiwfqk33f703zr3fv96mwbn58msdf20ma9l2")
402 (mozilla-patch "icecat-CVE-2017-5434.patch" "ee0a7b55e470" "01vs4p56p0ii0fvmg0kn7gaz6gwf2kwmv6v4pa6v68hwxx1phaag")
403 (mozilla-patch "icecat-CVE-2017-5430-pt07.patch" "a4e1e04c88ee" "0q07qwzxf2iisrhknjbn1zksv2rr6qzzh6w8ibzlj1sqbdg3h852")
404 (mozilla-patch "icecat-bug-1335043.patch" "a49419f75b9c" "0pkh5yimnj3p1sd2g9vndgcn11zdx6yhpa88s8vk7fqbs8gf1fz3")
405 (mozilla-patch "icecat-bug-1299500-pt01.patch" "5fdd36b4400a" "1gdrsbf03wf9v90f1bd2sp9ac38a9lzpzfrv8l8f7gvy70acjxmb")
406 (mozilla-patch "icecat-bug-1299500-pt02.patch" "34776df5ce44" "15mlf59ii0rk97j8mlf3wz1q0w28ma5mll47dvci6cv3dziai9f1")
407 (mozilla-patch "icecat-bug-1299500-pt03.patch" "26189af0f504" "1wh1s2xd1w03zi5jdaagk6j5i8v9xsm9360xmv446wdraygkqbci")
408 (mozilla-patch "icecat-bug-1299500-pt04.patch" "798a8fe17e7b" "0vlalanffq3paa7zab003v1d377x5pvcsy8nc8fr5pdlvi622jll")
409 (mozilla-patch "icecat-bug-1299500-pt05.patch" "daf2e4f2bd5c" "1rxbjbyr1a6dxjb0qj6900g3kqjphir40pis4qcfl8q811y18jwk")
410 (mozilla-patch "icecat-bug-1299500-pt06.patch" "1187091c3134" "0r8zz4zbglxg6sl0ybz9lyq1c5w2nqp0xcn2d3rz9bvyj8byqc7m")
411 (mozilla-patch "icecat-bug-1299500-pt07.patch" "a908f2c2fe30" "1fvwy3fxfrdi9y8hmf4f9aa72i0g6s55s8cp0w22gllsl1f6gvyf")
412 (mozilla-patch "icecat-bug-1299500-pt08.patch" "e95a26cf7a42" "0pd0kcn7dqd1gy1si85as5zzc96v7vq0v8n3g3gjzms5rdnk085l")
413 (mozilla-patch "icecat-bug-1299500-pt09.patch" "d63f3b14e571" "0cqd7dal6prsrj7bn2d699idbq4fzjry9vqlbmm9dkyn5683sdy1")
414 (search-patch "icecat-bug-1299500-pt10.patch") ; Adapted for GNU IceCat, based on:
415 ;"08f2bc167ae8" "07d1i23ffvi74a5558bb0645vbrap6qlrpcwfyb7dm3llbfnfycy")
416 (mozilla-patch "icecat-bug-1299500-pt11.patch" "263f27805689" "0nczkvyvlpdjif3xfvj7g2mfz6j06w99x2sblqfmqq6mwrlavpq0")
417 (mozilla-patch "icecat-CVE-2017-5456.patch" "538e0b382cc2" "0wq2ywn4a7i4ypcx03hl23a4xx3lavz7y505m9kw43fx15r4070r")
418 (mozilla-patch "icecat-bug-1280079.patch" "6fbcb6a4b91e" "0qcwz9js1bwlnwyv3vhkm0hvahd043lm2bijqsmm0jy20dbslga4")
419 (mozilla-patch "icecat-CVE-2017-5435.patch" "a362e1205ba4" "127i4ybfb4dk5axp4dxcl7ag7zyx7b517myvs6q4yd8981d1jjd3")
420 (mozilla-patch "icecat-bug-1341960.patch" "b24ce30e8cfa" "0a521wn8hbaliawmxs21b8wc1gkha8iih62j4zyrfg5rm7ff6p6s")
421 (mozilla-patch "icecat-CVE-2017-5454.patch" "ac40d4a4e414" "0dnzz95vpq32bsh6hajk4hrcrxwd4w6m7kayl2iziryny86jgak2")
422 (mozilla-patch "icecat-CVE-2017-5429-pt03.patch" "e469af8e9ccc" "0yn8zqakr9yw0jvysxyc8if09kqf4fr5rq4p9qdkb1p81p4dpmp5")
423 (mozilla-patch "icecat-bug-1351094.patch" "4c1383e76adc" "0wdldx88qabyhrwnnii44pggmfgqylzxy6ckwzgq86r2yipi4rsq")
424 (mozilla-patch "icecat-bug-1336527.patch" "b9f53baeabb3" "0y1l641ffbr4i85p0wc1ir6bcsy6h94bchbfc7ppxfijva4fjgvd")
425 (mozilla-patch "icecat-bug-1345716.patch" "2569af645a98" "1d6lx85ij90j6q6ixwp0h3w7y424yvkz0njsi0my727akbli5rsn")
426 (mozilla-patch "icecat-bug-1208957.patch" "2b68880d8f6b" "1pl0vkv7clyjchi9kg4995z82sr8xv7cbz1kvsg1v66md6pmp4s4")
427 (mozilla-patch "icecat-bug-1208957.patch" "bc646835442b" "0f29r5yvlb5w84nvvn6j9r9dq5314jgygjmsna3grzigpkb88gyj")
428 (mozilla-patch "icecat-bug-1347944.patch" "47cb652ddc25" "0n7871958zwndwz53xvzwjv41v5ar1vxaam8kzr5dkbqmprddimx")
429 (mozilla-patch "icecat-bug-1347632.patch" "7d8f7a52a108" "0gkbkzkz989j7pk3ia1rfvyjg3si8hnnadwkb2rw13qjxdzhx2zn")
430 (mozilla-patch "icecat-CVE-2017-5438.patch" "154c93b9435b" "00f8lr5s8h68392bb45zi0xfgqrgfkdxbzwdypp10d89784fvjvd")
431 (mozilla-patch "icecat-bug-1347486.patch" "15dbaf157058" "1mwgfnx1zsvhp0pgmc8577yw6lnf7g3ikdfj0r21fgffrn76bp69")
432 (mozilla-patch "icecat-bug-1218437.patch" "e13692bfd5f5" "10jrbs26m8l1vchw6svssrb5h8p82acrcmkx92ybvv4qbaq2bcl0")
433 (mozilla-patch "icecat-bug-1345853.patch" "5fa27dc4c4a3" "1sqqa4hir2bsnnwnlr34has62kpncmw6l9mylwprd09fxmzzgrd7")
434 (mozilla-patch "icecat-CVE-2017-5429-pt04.patch" "00c051cd38c7" "1d4aa4nqyjc01mg3jvdjjp7z05c2qhdjj85dhdrd9c18gfiyv4fi")
435 (mozilla-patch "icecat-bug-1349921.patch" "c6897adc4037" "0acvcdy8awdmpz84243jzf82agrm73wqa198fjbns1p1v3s425z2")
436 (mozilla-patch "icecat-bug-1338623.patch" "edcafd42dd52" "1xqgjy7a62jsyz1b5mibrcnd7zpb4gdaas0a6z5dwfvz52j4xa16")
437 (mozilla-patch "icecat-bug-1294799.patch" "0617b074ec3d" "19h7dj44shvdzzj87svpv5q97cikxyxhiwfzf9rnqj1b7fw0xrdh")
438 (mozilla-patch "icecat-bug-1345049.patch" "88466b911357" "16pgd13mw9a0snyhq6vxmjc7kr9mikvhazkgbc6vpykwi0i0z85b")
439 (mozilla-patch "icecat-bug-1339999.patch" "b7cb8f8b0877" "0zv1kxcva699ahb9s36l4d9mlrkm0b7hmh6g1422j6iijn136vxb")
440 (mozilla-patch "icecat-bug-1350868.patch" "ddd6c44790c0" "182ii4wsz2vdd1q4dszd5hka8i2n0ghmqk7l39bd02d3zfibhhvc")
441 (mozilla-patch "icecat-bug-1342360.patch" "416681a239ef" "0ngs8xgmdhz9ag4dlrqhr0vmanqxr9q2vf16jpm3cimyc06zjxz4")
442 (mozilla-patch "icecat-CVE-2017-5429-pt05.patch" "a76e626ae6db" "0zn2j8fmhp7502kx1jhrvh85vsys5x6x6gw3v4gl0h8px354v6yw")
443 (mozilla-patch "icecat-CVE-2017-5429-pt06.patch" "0ce4196ab86e" "0isczy8261qz2zsdxax4j51gypz0gi39q7nfwxg88sl81kc5vym8")
444 (mozilla-patch "icecat-CVE-2017-5429-pt07.patch" "39da731d80ed" "0vswnv1hqa7r8iz6y5ja7i6w3cyq5xrcd66c1q29ac6n4gn7x338")
445 (mozilla-patch "icecat-CVE-2017-5430-pt08.patch" "1b148cf9c545" "0ilrib0c2c7mfycpz2hq3vrfdf6sf8lcdbfjk6r4xyxv54vh3lwk")
446 (mozilla-patch "icecat-bug-1325841.patch" "74e9f13c554f" "0glzcgjsy71y78zaccn33w8djs96i6dd3gafyzkihnkpfddd5cij")
447 (mozilla-patch "icecat-CVE-2017-5445.patch" "d7d87adfe186" "02p705si2j69ya8n5a916x58nycs07ja0sfpxrwl16f4n2plc91h")
448 (mozilla-patch "icecat-bug-1346424.patch" "5ede402f494f" "0kbx8yn8ppv7099ic6nhw32f7h42pnwk6dpvb179ilw90ah902q7")
449 (mozilla-patch "icecat-CVE-2017-5430-pt09.patch" "da44c5cfab2e" "16i4dz5sfkhh3a0khrcf8zn5w20rkf4aqwygjj3cp4qhdh7wnr75")
450 (mozilla-patch "icecat-CVE-2017-5430-pt10.patch" "0f966927bd55" "07pkhc6l6ylwrzgfm7i1galrvjawqqrhvhk6jcw4b30sfhi0bxq1")
451 (mozilla-patch "icecat-CVE-2017-5429-pt08.patch" "f0f591f82cc0" "18p091503vpfpp4l3d7hkqj78zavv6qj1lynhlfx67zdp3xqcf8r")
452 (mozilla-patch "icecat-CVE-2017-5464.patch" "1852dc0beba4" "1zdnkrsqjfv1q2jhj4829ypiwyg78n4jv54yn3b74vwcf5zvzx8m")
453 (mozilla-patch "icecat-bug-1083140.patch" "6913f0537208" "0vaf61ryp0bzkz6l1w73alhglibbgm0jcgccxvvm43ni67pcxqbq")
454 ;; The patch commented out below updates the bundled tzdata,
455 ;; but we can't use it because it contains a GIT binary patch.
456 ;; TODO: Consider updating the bundled tzdata, or unbundling it.
457 ;; (mozilla-patch "icecat-bug-1343493.patch" "35496444b380" "1wa79az7121xw078cgpczxavrqy0fsp4ib2nb69giha6acxcaqas")
458 (mozilla-patch "icecat-CVE-2017-5430-pt11.patch" "64495dfa29db" "0m7vklnwnaf7sw97m87bm4lb9pjmlh1vvrbaf1931db8nhd6m737")
459 (mozilla-patch "icecat-bug-1350783.patch" "26cd34db3c14" "15vq3lrilg3n9j80cdjmk7xib2iq5gcx9ypq8xs7f5ya9ibasqlx")
460 (mozilla-patch "icecat-CVE-2017-5429-pt09.patch" "6cd77a0d7ac0" "0kxlbl5m3gffxqrv7ky3swsbyg1ykj0wjhlfl9amsb4g8gra3zkj")
461 (mozilla-patch "icecat-CVE-2017-5460-pt1.patch" "a803be74843c" "1ywwakzjkfr714i9pfn152n86c6rp427chzdys8phdkcvp5d5p45")
462 (mozilla-patch "icecat-CVE-2017-5460-pt2.patch" "73762c1392ae" "18jy9ccqvn6l6hznvq5xsqm1pc7i81svc2grgv21wfwg9sd6zwwh")
463 (mozilla-patch "icecat-bug-1337392-pt1.patch" "4ab6d5c43036" "07pygzngssra9wnmqqrs24d6gc5kfh20fkzvpcasxh4f2hi21z9b")
464 (mozilla-patch "icecat-bug-1337392-pt2.patch" "13f2d85da9a7" "1iwfz7dp5i93bhjspy4kyz0vqrl8x8ndg5kxdyzwb1b339xim9qy")
465 (mozilla-patch "icecat-CVE-2017-5429-pt10.patch" "7a30cddfcd54" "1773pijh6gi086l930cn1a0k7kvy7f3cnirfblw98sq7h9qfyy33")
466 (mozilla-patch "icecat-bug-1345873-pt1.patch" "75cea353ad78" "14cig2y7d3p033hx3096gxzlqwgddq8d0ig0g3l8p1b0xwvvyryl")
467 (mozilla-patch "icecat-bug-1345873-pt2.patch" "b08ef5a82f89" "0afz01jv850x09df85d7ycqkcdlafi4w2xi5k155lk2b92w8lhpj")
468 (mozilla-patch "icecat-bug-1340163.patch" "f3f2a995a239" "1ydsj4ja475jscalkw6ggdxgbsp5l2mam5109k0y7c98abzqraxk")
469 (mozilla-patch "icecat-bug-1348174-pt1.patch" "330904d6f0dc" "19wnp4d8481w86xkk78n7c7wrr99rq6cq3v09hd8am4n0mzwzaja")
470 (mozilla-patch "icecat-bug-1348174-pt2.patch" "c61b99483c4b" "0mjsahi8ly24415ri2sylas6g0kb8wawi095idqiq019c3r7q9cq")
471 (mozilla-patch "icecat-bug-1348601.patch" "1848bd238064" "1f5kadhn6w1rs26sdrcc3mq0zzlmmsm6ymqhshkzn57nrj6akm7b")
472 (mozilla-patch "icecat-bug-1345991.patch" "2008a4b89d9a" "07fkg9r2rxbk362ckv2h8inhd2dadvzigshm6zsjfjs2fyzp95hp")
473 (mozilla-patch "icecat-bug-1344498-pt1.patch" "9acd0103d67f" "1f0j667g05h9ydmc924cs8mzif1n7s56wixsgnyqc3s231dswhml")
474 (mozilla-patch "icecat-bug-1344498-pt2.patch" "49aadb25b1ec" "0s618m802b1x5pyqh5mj1azaxch7ggxq9503b7mwhg90vz8qw7ki")
475 (mozilla-patch "icecat-bug-1344205.patch" "34b453085dc0" "02h1bh24f9i5sm3my07m2q58cpzqfhagwwv11l9fidxcm9dmzmrd")
476 (mozilla-patch "icecat-bug-1349862.patch" "864ff0c36b6b" "1i3wmigv982x9hzkfg25jhyvkynmar69x6cj6r4g9zkk5f5ypdh5")
477 (mozilla-patch "icecat-CVE-2017-5459.patch" "5ec6fbedb420" "07flhha4rkjbry5590yr5by36ypb1k33qm3rzkbmw0vk5gyak8dp")
478 (mozilla-patch "icecat-CVE-2017-5465.patch" "2b95de78a92c" "0vvq1fz84yyw7za929x6ki25paivlwd4ng1ddkcb2bw6da6yp12k")
479 (mozilla-patch "icecat-CVE-2017-5466.patch" "a5ec5e70abf1" "1jjviyk6db8iccd7997mwmgs188fsyrzivap3ffjf8m6j4mf9cra")
480 (mozilla-patch "icecat-bug-1347646.patch" "1b50711a46ce" "1i3505zzgf0mvg2405y2gzq36xc8ic2ga8w6d3n9kqryxj0mc7bh")))
481 (modules '((guix build utils)))
484 (use-modules (ice-9 ftw))
485 ;; Remove bundled libraries that we don't use, since they may
486 ;; contain unpatched security flaws, they waste disk space and
487 ;; network bandwidth, and may cause confusion.
488 (for-each delete-file-recursively
489 '(;; FIXME: Removing the bundled icu breaks configure.
490 ;; * The bundled icu headers are used in some places.
491 ;; * The version number is taken from the bundled copy.
494 ;; FIXME: A script from the bundled nspr is used.
497 ;; TODO: Use system media libraries. Waiting for:
498 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=517422>
502 ;; * libtremor (not yet in guix)
505 ;; * soundtouch (not yet in guix)
507 ;; TODO: Use system harfbuzz. Waiting for:
508 ;; <https://bugzilla.mozilla.org/show_bug.cgi?id=847568>
510 ;; TODO: Use system graphite2.
512 "dom/devicestorage" ; Removed in ESR 52.1, awkward to patch out
516 "ipc/chromium/src/third_party/libevent"
521 "js/src/ctypes/libffi"
523 ;; Delete .pyc files, typically present in icecat source tarballs
524 (for-each delete-file (find-files "." "\\.pyc$"))
525 ;; Delete obj-* directories, sometimes present in icecat tarballs
526 (for-each delete-file-recursively
527 (scandir "." (lambda (name)
528 (string-prefix? "obj-" name))))
530 (build-system gnu-build-system)
532 `(("alsa-lib" ,alsa-lib)
536 ("dbus-glib" ,dbus-glib)
537 ("gdk-pixbuf" ,gdk-pixbuf)
542 ("freetype" ,freetype)
543 ("hunspell" ,hunspell)
544 ("libcanberra" ,libcanberra)
545 ("libgnome" ,libgnome)
546 ("libjpeg-turbo" ,libjpeg-turbo)
548 ("libevent" ,libevent-2.0)
549 ("libxinerama" ,libxinerama)
550 ("libxscrnsaver" ,libxscrnsaver)
551 ("libxcomposite" ,libxcomposite)
558 ("pulseaudio" ,pulseaudio)
560 ("mit-krb5" ,mit-krb5)
564 ("startup-notification" ,startup-notification)
570 ("python" ,python-2) ; Python 3 not supported
571 ("python2-pysqlite" ,python2-pysqlite)
573 ("pkg-config" ,pkg-config)
574 ("autoconf" ,autoconf-2.13)
577 `(#:tests? #f ; no check target
578 #:out-of-source? #t ; must be built outside of the source directory
580 ;; XXX: There are RUNPATH issues such as
581 ;; $prefix/lib/icecat-31.6.0/plugin-container NEEDing libmozalloc.so,
582 ;; which is not in its RUNPATH, but they appear to be harmless in
583 ;; practice somehow. See <http://hydra.gnu.org/build/378133>.
584 #:validate-runpath? #f
586 #:configure-flags '("--enable-default-toolkit=cairo-gtk3"
588 "--enable-startup-notification"
589 "--enable-pulseaudio"
594 ;; Building with debugging symbols takes ~5GiB, so
597 "--disable-debug-symbols"
599 ;; Hack to work around missing
600 ;; "unofficial" branding in icecat.
601 "--enable-official-branding"
603 ;; Avoid bundled libraries.
606 "--with-system-jpeg" ; must be libjpeg-turbo
607 "--with-system-libevent"
608 "--with-system-libvpx"
612 "--enable-system-pixman"
613 "--enable-system-cairo"
614 "--enable-system-ffi"
615 "--enable-system-hunspell"
616 "--enable-system-sqlite"
618 ;; Fails with "--with-system-png won't work because
619 ;; the system's libpng doesn't have APNG support".
621 ;; http://sourceforge.net/projects/libpng-apng/ ,
622 ;; "the Animated Portable Network Graphics (APNG)
623 ;; is an unofficial extension of the Portable
624 ;; Network Graphics (PNG) format";
625 ;; we probably do not wish to support it.
626 ;; "--with-system-png"
629 #:modules ((ice-9 ftw)
632 ,@%gnu-build-system-modules)
634 (modify-phases %standard-phases
636 'unpack 'ensure-no-mtimes-pre-1980
638 ;; Without this, the 'source/test/addons/packed.xpi' and
639 ;; 'source/test/addons/simple-prefs.xpi' targets fail while trying
640 ;; to create zip archives.
641 (let ((early-1980 315619200)) ; 1980-01-02 UTC
642 (ftw "." (lambda (file stat flag)
643 (unless (<= early-1980 (stat:mtime stat))
644 (utime file early-1980 early-1980))
648 'unpack 'use-skia-by-default
650 ;; Use the bundled Skia library by default, since IceCat appears
651 ;; to be far more stable when using it than when using our system
653 (let ((out (open "browser/app/profile/icecat.js"
654 (logior O_WRONLY O_APPEND))))
655 (format out "~%// Use Skia by default~%")
656 (format out "pref(~s, ~s);~%" "gfx.canvas.azure.backends" "skia")
657 (format out "pref(~s, ~s);~%" "gfx.content.azure.backends" "skia")
661 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlopen
663 ;; libxul.so dynamically opens libraries, so here we explicitly
664 ;; link them into libxul.so instead.
666 ;; TODO: It might be preferable to patch in absolute file names in
667 ;; calls to dlopen or PR_LoadLibrary, but that didn't seem to
668 ;; work. More investigation is needed.
669 (substitute* "toolkit/library/moz.build"
670 (("^# This library needs to be last" all)
671 (string-append "OS_LIBS += [
672 'GL', 'gnome-2', 'canberra', 'Xss', 'cups', 'gssapi_krb5',
673 'avcodec', 'avutil', 'pulse' ]\n\n"
678 ;; configure does not work followed by both "SHELL=..." and
679 ;; "CONFIG_SHELL=..."; set environment variables instead
680 (lambda* (#:key outputs configure-flags #:allow-other-keys)
681 (let* ((out (assoc-ref outputs "out"))
682 (bash (which "bash"))
683 (abs-srcdir (getcwd))
684 (srcdir (string-append "../" (basename abs-srcdir)))
685 (flags `(,(string-append "--prefix=" out)
686 ,(string-append "--with-l10n-base="
689 (setenv "SHELL" bash)
690 (setenv "CONFIG_SHELL" bash)
691 (setenv "AUTOCONF" (which "autoconf")) ; must be autoconf-2.13
694 (format #t "build directory: ~s~%" (getcwd))
695 (format #t "configure flags: ~s~%" flags)
696 (zero? (apply system* bash
697 (string-append srcdir "/configure")
699 (add-before 'configure 'install-desktop-entry
700 (lambda* (#:key outputs #:allow-other-keys)
701 ;; Install the '.desktop' file.
702 (define (swallow-%%-directives input output)
703 ;; Interpret '%%ifdef' directives found in the '.desktop' file.
704 (let loop ((state 'top))
705 (match (read-line input 'concat)
709 (cond ((string-prefix? "%%ifdef" line)
711 ((string-prefix? "%%else" line)
713 ((string-prefix? "%%endif" line)
718 (display line output)
723 (let* ((out (assoc-ref outputs "out"))
724 (applications (string-append out "/share/applications")))
725 (call-with-input-file "debian/icecat.desktop.in"
727 (call-with-output-file "debian/icecat.desktop"
729 (swallow-%%-directives input output)))))
731 (substitute* "debian/icecat.desktop"
732 (("@MOZ_DISPLAY_NAME@")
734 (("^Exec=@MOZ_APP_NAME@")
735 (string-append "Exec=" out "/bin/icecat"))
738 (install-file "debian/icecat.desktop" applications)
740 (add-after 'install-desktop-entry 'install-icons
741 (lambda* (#:key outputs #:allow-other-keys)
742 (let ((out (assoc-ref outputs "out")))
743 (with-directory-excursion "browser/branding/official"
746 (let* ((size (string-filter char-numeric? file))
747 (icons (string-append out "/share/icons/hicolor/"
748 size "x" size "/apps")))
750 (copy-file file (string-append icons "/icecat.png"))))
751 '("default16.png" "default22.png" "default24.png"
752 "default32.png" "default48.png" "content/icon64.png"
753 "mozicon128.png" "default256.png"))))))
754 ;; This fixes the file chooser crash that happens with GTK 3.
755 (add-after 'install 'wrap-program
756 (lambda* (#:key inputs outputs #:allow-other-keys)
757 (let* ((out (assoc-ref outputs "out"))
758 (lib (string-append out "/lib"))
759 (gtk (assoc-ref inputs "gtk+"))
760 (gtk-share (string-append gtk "/share")))
761 (wrap-program (car (find-files lib "^icecat$"))
762 `("XDG_DATA_DIRS" ":" prefix (,gtk-share)))))))))
763 (home-page "https://www.gnu.org/software/gnuzilla/")
764 (synopsis "Entirely free browser derived from Mozilla Firefox")
766 "IceCat is the GNU version of the Firefox browser. It is entirely free
767 software, which does not recommend non-free plugins and addons. It also
768 features built-in privacy-protecting features.")
769 (license license:mpl2.0) ;and others, see toolkit/content/license.html
771 `((ftp-directory . "/gnu/gnuzilla")
772 (cpe-name . "firefox_esr")
773 (cpe-version . ,(first (string-split version #\-)))))))