From 00e762904eedd4603d67be5f1c86e7e7f1d384c2 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 10 Jul 2024 13:37:21 +0300 Subject: guix: packages: Add browsers --- guix/packages/browsers.scm | 123 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 guix/packages/browsers.scm (limited to 'guix') diff --git a/guix/packages/browsers.scm b/guix/packages/browsers.scm new file mode 100644 index 0000000..9ea0433 --- /dev/null +++ b/guix/packages/browsers.scm @@ -0,0 +1,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)))) -- cgit v1.2.3