1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
(define-module (packages browsers)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system qt)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages qt)
#:use-module (gnu packages gl)
#:use-module (gnu packages gcc)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages tls))
(define serenity-source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/SerenityOS/serenity")
(commit "fd6bb41519d01390e7a8b1ed6554a58b38d6cb88")))
(file-name (git-file-name "serenity" "0"))
(sha256 (base32 "17rhgdqagj0by4h3pds9k71az5ffhzrx8f7d1zn0qr9qa7vkj6dd"))
(modules '((guix build utils)))
(snippet
'(begin
; (delete-file "Userland/Libraries/LibUnicode/Normalize.cpp")
; (substitute* "Userland/Libraries/LibUnicode/CMakeLists.txt"
; (("\\bNormalize\\.cpp\\b") ""))
(substitute* "Meta/CMake/utils.cmake"
(("Downloading file \\$\\{file} from \\$\\{url}") "Downloading file ${path} from ${url}"))
(substitute* "Meta/CMake/common_compile_options.cmake"
(("\\badd_compile_options\\(-Werror\\)") ""))))))
(define cldr-version "42.0.0")
(define cldr-json
(origin
(method url-fetch)
(uri (string-append "https://github.com/unicode-org/cldr-json/releases/download/" cldr-version "/cldr-" cldr-version "-json-modern.zip"))
(sha256 (base32 "1hmdqca0gdx3waafbz2dypika6gd5p7wb6p90ff0bfgvwx9p1n07"))))
(define ucd-version "15.0.0")
(define ucd-emoji-version "15.0")
(define ucd
(origin
(method url-fetch)
(uri (string-append "https://unicode.org/Public/" ucd-version "/ucd/UCD.zip"))
(sha256 (base32 "133inqn33hcfvylmps63yjr6rrqrfq6x7a5hr5fd51z6yc0f9gaz"))))
(define ucd-emoji-test
(origin
(method url-fetch)
(uri (string-append "https://unicode.org/Public/emoji/" ucd-emoji-version "/emoji-test.txt"))
(sha256 (base32 "1nskm3qqb568dlsz54r0ympqbzyf9zhn40lxw5mhk3iqr0xg4ic4"))))
(define tzdb-version "2022f")
(define tzdb
(origin
(method url-fetch)
(uri (string-append "https://data.iana.org/time-zones/releases/tzdata" tzdb-version ".tar.gz"))
(sha256 (base32 "007hgak36scah2fsgf7gkzw2fw5b3jp8mziip5kja8axcwgxg44r"))))
(define ladybird
(package
(name "ladybird")
(version "0")
(synopsis "The Ladybird Web Browser is a browser using the SerenityOS LibWeb engine with a Qt GUI.")
(description synopsis)
(home-page "https://github.com/SerenityOS/ladybird")
(license license:bsd-2)
(source
(origin
(method git-fetch)
(uri
(git-reference
(url "https://github.com/SerenityOS/ladybird")
(commit "7e670a08180c51d474b982f871074c1b60cf49f7")))
(file-name (git-file-name name version))
(sha256 (base32 "1z0jmnif91fmby175584vv6cwl2aj0ks0c1aajigwskp024fx62m"))))
(native-inputs
(list
`("gcc" ,gcc-12)
`("libxkbcommon" ,libxkbcommon)
`("mesa" ,mesa)
`("openssl" ,openssl)
`("qtbase" ,qtbase)
`("qttools" ,qttools)
`("serenity-source" ,serenity-source)
`("cldr-json" ,cldr-json)
`("ucd" ,ucd)
`("ucd-emoji-test" ,ucd-emoji-test)
`("tzdb" ,tzdb)))
(build-system qt-build-system)
(arguments
`(#:configure-flags
(list
(string-append "-DSERENITY_SOURCE_DIR=" (getcwd) "/source/serenity"))
#:out-of-source? #f
#:phases
(modify-phases %standard-phases
(add-before 'patch-source-shebangs 'copy-serenity-source
(lambda* (#:key inputs #:allow-other-keys)
(copy-recursively (assoc-ref inputs "serenity-source") "serenity")))
(add-before 'configure 'copy-data
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "CLDR") (mkdir-p "UCD") (mkdir-p "TZDB")
(let ((port (open-file "CLDR/version.txt" "w")))
(display ,cldr-version port)
(close port))
(let ((port (open-file "UCD/version.txt" "w")))
(display ,ucd-version port)
(close port))
(let ((port (open-file "TZDB/version.txt" "w")))
(display ,tzdb-version port)
(close port))
(copy-file (assoc-ref inputs "cldr-json") "CLDR/cldr.zip")
(copy-file (assoc-ref inputs "ucd") "UCD/UCD.zip")
(copy-file (assoc-ref inputs "ucd-emoji-test") "UCD/emoji-test.txt")
(copy-file (assoc-ref inputs "tzdb") "TZDB/tzdb.tar.gz")))
(add-before 'build 'make-libweb-generated-directories
(lambda _
(mkdir-p "_deps/lagom-build/Userland/Libraries/LibWeb/Bindings")
(mkdir-p "_deps/lagom-build/WebContent"))))
; no tests
#:tests? #f))))
|