diff options
author | Sisiutl <sisiutl@egregore.fun> | 2025-03-01 19:40:46 +0100 |
---|---|---|
committer | Sisiutl <sisiutl@egregore.fun> | 2025-03-01 19:40:46 +0100 |
commit | 44c72265a0b2bee22d263427298ab3035bd51264 (patch) | |
tree | 21a6936ae6dbb3eac2e8b2c315658825c68a7684 | |
parent | d450b132a4435326cf60693dd6445d0d55a62bbd (diff) |
the palemoon has fallen billions must battering
-rw-r--r-- | sigils/packages/palemoon-extensions.scm | 59 | ||||
-rw-r--r-- | sigils/packages/palemoon.scm | 408 |
2 files changed, 0 insertions, 467 deletions
diff --git a/sigils/packages/palemoon-extensions.scm b/sigils/packages/palemoon-extensions.scm deleted file mode 100644 index 3c68d85..0000000 --- a/sigils/packages/palemoon-extensions.scm +++ /dev/null @@ -1,59 +0,0 @@ -(define-module (sigils packages palemoon-extensions) - #:use-module (guix packages) - #:use-module (guix git-download) - #:use-module (guix gexp) - #:use-module (guix build-system copy) - #:use-module (guix build-system trivial) - #:use-module ((guix licenses) #:prefix license:)) - -(define* (make-browser-extension pkg - #:optional (pkg-output "out") - #:key - (browser-name "palemoon") - (moz-app-id "{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}")) - "Create an extension from package PKG and return a package that, -when installed, will make the extension contained in PKG available as a -browser extension. PKG-OUTPUT specifies which output of PKG to use." - (package - (inherit pkg) - (location (package-location pkg)) - (name (string-append (package-name pkg) "-" browser-name)) - (inputs '()) - (native-inputs '()) - (outputs '("out")) - (build-system trivial-build-system) - (arguments - (list - #:modules '((guix build utils)) - #:builder - #~(begin - (use-modules (guix build utils)) - (let* ((addon-id #$(assq-ref (package-properties pkg) 'addon-id)) - (search-dir (format #f "~a/lib/~a/extensions/~a" #$output #$browser-name #$moz-app-id))) - ;; It should work for Palemoon too! - (mkdir-p search-dir) - (symlink (in-vicinity (ungexp pkg pkg-output) addon-id) - (in-vicinity search-dir addon-id)))))))) - -(define-public ematrix - (package - (name "ematrix") - (version "5.1.0") - (home-page "https://gitlab.com/vannilla/ematrix") - (source (origin - (method git-fetch) - (uri (git-reference - (url home-page) - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0wgy4nhmym62pcw8rikfiyfjw7ifzf173wz8kky3k8w79h2bzfxp")))) - (build-system copy-build-system) - (properties '((addon-id . "ematrix@vannilla.org"))) - (arguments `(#:install-plan '(("." ,(assq-ref properties 'addon-id))))) - (synopsis "Fork of uMatrix, a browser extension to black/white list requests.") - (description "eMatrix is a fork of uMatrix for XPI browsers.") - (license license:gpl3))) - -(define-public ematrix/palemoon - (make-browser-extension ematrix)) diff --git a/sigils/packages/palemoon.scm b/sigils/packages/palemoon.scm deleted file mode 100644 index d8abab1..0000000 --- a/sigils/packages/palemoon.scm +++ /dev/null @@ -1,408 +0,0 @@ -;; -*- fill-column: 120 -*- -(define-module (sigils packages palemoon) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module (guix gexp) - #:use-module (guix git-download) - #:use-module (guix build-system copy) - #:use-module (guix build-system mozilla) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages) - #:use-module (gnu packages assembly) - #:use-module (gnu packages autotools) - #:use-module (gnu packages base) - #:use-module (gnu packages bash) - #:use-module (gnu packages crypto) - #:use-module (gnu packages compression) - #:use-module (gnu packages freedesktop) - #:use-module (gnu packages gl) - #:use-module (gnu packages glib) - #:use-module (gnu packages gnome) - #:use-module (gnu packages gtk) - #:use-module (gnu packages image) - #:use-module (gnu packages linux) - #:use-module (gnu packages m4) - #:use-module (gnu packages nss) - #: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 sqlite) - #:use-module (gnu packages tls) - #:use-module (gnu packages version-control) - #:use-module (gnu packages video) - #:use-module (gnu packages xorg) - #:autoload (ice-9 regex) (string-match) - #:autoload (ice-9 optargs) (let-keywords)) - -(define* (make-uxp-browser app-name - app-version - #:key - with-gtk3? - (branding "official")) - (package - (name app-name) - (version app-version) - (source #f) - (build-system mozilla-build-system) - (native-inputs - (list autoconf - gtk+-2 ;; Needed for NPAPI and WebRTC in the GTK3 build. - libxcrypt - m4 - perl - pkg-config - python-2.7 - tar - unzip - which - yasm - zip)) - (inputs - (list bash-minimal - alsa-lib - ;; bluez-alsa - ;; bluez-gstreamer - bzip2 - dbus-glib - desktop-file-utils - ffmpeg - gconf - glib - (if with-gtk3? - gtk+ - gtk+-2) - libaom - libdbusmenu - libjpeg-turbo - libxcomposite - libxt - mesa - openssl - pulseaudio - sqlite - zlib)) - (arguments - (let* ((build-by-date? (string-match "[0-9]{4}\\.[0-9]{2}\\.[0-9]{2}" version)) - (gtk-version (if with-gtk3? "gtk3" "gtk2")) - (branding-dir (format #f "~a/branding/~a" name branding)) - (distdir (format #f "obj-~a/dist" (string-replace-substring - (or (%current-target-system) - %host-type) - "unknown" - "pc"))) - (build-date (string-append (string-replace-substring version "." "") "000000")) - (tarball-dist - (format #f "~a/~a-~a.~a-~a.tar.xz" - distdir - name - (if build-by-date? - build-date - version) - (string-join (reverse (string-split (or (%current-target-system) - (%current-system)) #\-)) "-") - gtk-version))) - (list #:tests? #f - #:configure-flags #~'(#$(string-append "--enable-application=" name) - "--enable-appcompat-guid" - "--enable-accessibility" - "--enable-av1" - #$(string-append "--enable-default-toolkit=cairo-" gtk-version) - "--enable-devtools" - "--enable-elf-hack" - "--enable-jemalloc" - "--enable-jxl" - "--enable-more-deterministic" - "--enable-necko-wifi" - "--enable-npapi" - "--enable-official-branding" ;; Official branding. - #$(string-append "--with-branding=" branding-dir) - #$(format #f "--enable-optimize=~s" "-O2 -w") - "--enable-strip" - "--enable-webrtc" - "--enable-system-ffi" - "--enable-system-cairo" - "--enable-system-pixman" - ;; UNBUNDLE: "--enable-system-hunspell" - "--enable-system-extension-dirs" - "--disable-debug" - "--disable-debug-js-modules" - "--disable-debug-symbols" - "--disable-gamepad" - "--disable-gold" - "--disable-tests" - "--disable-updater" - "--with-pthreads" - ;; "--with-gl-provider=EGL" - "--with-system-bz2" - "--with-system-jpeg" - "--with-system-zlib" - "--with-x") - #:modules '((guix build utils) - (guix build gnu-build-system) - (ice-9 regex)) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'fix-prefs - (lambda* (#:key inputs #:allow-other-keys) - (let ((port (open-file #$(format #f "~a/app/profile/~a.js" name name) "a"))) - (for-each (lambda (pref) - (let ((key (car pref)) - (value (if (boolean? (cadr pref)) - (if (cadr pref) - 'true - 'false) - (cadr pref)))) - (format port "~%pref(~s, ~s);~%" key value) - (format #t "fix-prefs: setting value of ~s to ~s~%" key value))) - '(("browser.backspace_action" 0) - ("extensions.blocklist.enabled" #f) ;; Feudal blocking - ("browser.shell.checkDefaultBrowser" #f) - ("security.sandbox.content.read_path_whitelist" (%store-directory)))) - (close-port port)))) - (add-after 'fix-prefs 'patch-configure-in - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "./configure.in" ;; Doesn't get patched automatically. Why ? This eludes me. - (("^#!/bin/sh") (format #f "#!~a" (search-input-file inputs "bin/sh")))))) - (add-before 'configure 'setenv - (lambda* (#:key inputs #:allow-other-keys) - (setenv "LDFLAGS" (string-append "-Wl,-rpath=" #$output "/lib/" #$name)) - (setenv "SHELL" (search-input-file inputs "/bin/bash")) - (setenv "CONFIG_SHELL" (search-input-file inputs "/bin/bash")) - (setenv "MOZILLA_OFFICIAL" "1") ;; Official branding - (setenv "MOZ_PKG_SPECIAL" #$gtk-version) - (setenv "MOZ_BUILD_DATE" #$build-date) - (setenv "MOZ_NOSPAM" "1"))) - (add-before 'configure 'mozconfig - (lambda* (#:key configure-flags #:allow-other-keys) - (call-with-output-file ".mozconfig" - (lambda (p) - (for-each (lambda (flag) - (format p "ac_add_options ~a~%" flag)) - configure-flags))))) - (replace 'configure - (lambda _ - (invoke "./mach" "configure"))) - (replace 'build - (lambda* (#:key (make-flags '()) (parallel-build? #t) - #:allow-other-keys) - (apply invoke "./mach" "build" - `(,(string-append - "-j" (number->string (if parallel-build? - (parallel-job-count) - 1))) - ,@make-flags)))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "./mach" "test")))) - (replace 'install - (lambda* (#:key inputs outputs #:allow-other-keys) - (invoke "./mach" "package") - (let ((tar (search-input-file inputs "/bin/tar")) - (lib (string-append #$output "/lib")) - (bin (string-append #$output "/bin"))) - (mkdir-p lib) - (mkdir-p bin) - (invoke tar "xJpf" #$tarball-dist "-C" lib) - (symlink (format #f "~a/~a/~a" lib #$name #$name) - (format #f "~a/~a" bin #$name))))) - (add-after 'install 'wrap-program - (lambda* (#:key inputs #:allow-other-keys) - (wrap-program (format #f "~a/lib/~a/~a" #$output #$name #$name) - `("GDK_BACKEND" = ("x11")) - `("MOZ_ENABLE_WAYLAND" = ("0"))))) - (add-after 'install 'install-branding - (lambda* (#:key outputs #:allow-other-keys) - (for-each (lambda (branding-file) - (let* ((size (match:substring - (string-match - (format #f "~a/default([0-9]+)\\.png" #$branding-dir) - branding-file) 1)) - (dir (format #f "~a/share/icons/hicolor/~ax~a/apps" #$output size size))) - (mkdir-p dir) - (copy-file - branding-file - (in-vicinity dir (format #f "~a.png" #$name))))) - (find-files #$branding-dir "default.*\\.png")) - (let* ((dir (format #f "~a/share/icons/hicolor/128x128/apps" #$output))) - (mkdir-p dir) - (copy-file - (format #f "~a/mozicon128.png" #$branding-dir) - (in-vicinity dir (format #f "~a.png" #$name)))))))))) - (synopsis "") - (description "") - (license #f) - (home-page ""))) - -(define (make-palemoon . args) - (let ((pkg (apply make-uxp-browser "palemoon" "33.5.1" args))) - (package - (inherit pkg) - (name (package-name pkg)) - (version (package-version pkg)) - (native-inputs (modify-inputs (package-native-inputs pkg) - (append git))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://repo.palemoon.org/MoonchildProductions/Pale-Moon.git") - (commit (string-append version "_Release")) - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0cvxk7hn7dg2jl9dd25kirydg6rbyszy7vyglm40pnyvxa3hjnf4")) - (patches - (parameterize - ((%patch-path - (map (lambda (directory) - (string-append directory "/sigils/packages/patches")) - %load-path))) - (search-patches "palemoon-vendor-basename.patch"))))) - (arguments (substitute-keyword-arguments (package-arguments pkg) - ((#:phases phases) - #~(modify-phases #$phases - (add-before 'fix-prefs 'remove-spyware-home-page - (lambda _ - (substitute* "palemoon/branding/shared/locales/browserconfig.properties" - ;; Switch the page from the properties to something local - (("(https?://)start.palemoon.org(/?)" all https slash) "about:home")) - (substitute* "palemoon/branding/official/palemoon.desktop" - ;; New tab should open the user's specified "New Tab" page, not the palemoon start page. - (("^Exec=palemoon -new-tab .*") - "Exec=palemoon -new-tab")) - (substitute* '("palemoon/branding/shared/pref/preferences.inc" - "palemoon/branding/unofficial/pref/palemoon-branding.js") - ;; Remove the startup.homepage_welcome_url preference - (("^pref\\(\"startup\\.homepage_(welcome|override)_url(.additional)?\", *\".*\"\\);\n$") "")))) - (add-after 'remove-spyware-home-page 'remove-spyware-search-engine - (lambda _ - ;; No tracking in the parameters. - (substitute* '("palemoon/locales/en-US/searchplugins/duckduckgo-palemoon.xml" - "palemoon/locales/en-US/searchplugins/mojeek.xml") - ((".*value=\"palemoon\".*") "")) - (substitute* '("palemoon/locales/en-US/searchplugins/answers.xml" - "palemoon/locales/en-US/searchplugins/ekoru.xml") - (("(client|ext)=palemoon&") "")))) - (add-after 'install-branding 'install-desktop-file - (lambda* (#:key outputs #:allow-other-keys) - (install-file #$(format #f "~a/branding/official/~a.desktop" name name) - (string-append #$output "/share/applications/")))))))) - (home-page "https://palemoon.org") - (synopsis "Independent browser derived from Firefox/Mozilla community code") - (description "Pale Moon is an Open Source, Goanna-based web browser.") - (license license:mpl2.0)))) - -(define basilisk-official-branding - (package - (name "basilisk-official-branding") - (version "63a2bff658c5dfff3b6de17fa54743078aa4eb7e") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://repo.palemoon.org/Basilisk-Dev/Basilisk.git") - (commit version) - (recursive? #f))) - (file-name (git-file-name name version)) - (sha256 - (base32 "02yz9wd5k3q1cklqslyzam3ji6mh6why7zr8hfyx88k9xqvlqix2")))) - (build-system copy-build-system) - (arguments '(#:install-plan '(("basilisk/branding/official/" ".")))) - (home-page "https://www.basilisk-browser.org/") - (synopsis "Official branding distributed with the Basilisk binaries") - (description "This is a Guix recipe that extracts the official branding from the last commit before it was removed -from the Basilisk repository.") - (license #f))) - -(define (make-basilisk . args) - (let ((pkg (apply make-uxp-browser "basilisk" "2025.01.04" args))) - (let-keywords args #t ((branding "official")) - (package - (inherit pkg) - (name (package-name pkg)) - (version (package-version pkg)) - (native-inputs (modify-inputs (package-native-inputs pkg) - (append basilisk-official-branding))) - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://repo.palemoon.org/Basilisk-Dev/Basilisk.git") - (commit (string-append "v" version)) - (recursive? #t))) - (file-name (git-file-name name version)) - (sha256 - (base32 "04b5zi81cb528vzx7yvf5ms1byfqcf6xvqb6l26alczld44dwfa9")))) - (arguments (substitute-keyword-arguments (package-arguments pkg) - ((#:phases phases) - #~(modify-phases #$phases - (add-after 'unpack 'include-official-branding - (lambda* (#:key native-inputs #:allow-other-keys) - (let ((dir "basilisk/branding/official")) - (mkdir-p dir) - (copy-recursively #$basilisk-official-branding dir)))) - (add-after 'include-official-branding 'remove-spyware-home-page - (lambda _ - (substitute* "basilisk/branding/official/pref/basilisk-branding.js" - ;; Remove the startup.homepage_welcome_url preference - (("^pref\\(\"startup\\.homepage_(welcome|override)_url(.additional)?\", *\".*\"\\);\n$") "")))) - (add-after 'remove-spyware-home-page 'remove-spyware-search-engine - (lambda _ - ;; No tracking in the parameters. Yup, Basilisk uses "palemoon" too. - (substitute* '("basilisk/locales/searchplugins/duckduckgo-palemoon.xml" - "basilisk/locales/searchplugins/mojeek.xml") - ((".*value=\"palemoon\".*") "")) - (substitute* "basilisk/locales/searchplugins/ekoru.xml" - (("ext=palemoon&") "")))) - (add-after 'install-branding 'install-vectorial-branding - (lambda _ - (let* ((dir (format #f "~a/share/icons/hicolor/scalable/apps" #$output))) - (mkdir-p dir) - (with-directory-excursion (string-append "basilisk/branding/" #$branding "/content") - (copy-file - "./identity-icons-brand.svg" - (in-vicinity dir "basilisk.svg")) - (copy-file - "./silhouette-40.svg" - (in-vicinity dir "basilisk-symbolic.svg")))))) - (add-after 'install 'make-basilisk-desktop - (lambda _ - ;; Add Basilisk desktop file. - (make-desktop-entry-file - (string-append #$output "/share/applications/basilisk.desktop") - #:name "Basilisk" - #:generic-name "Web Browser" - #:comment "Browse the World Wide Web" - #:exec (string-append #$output "/bin/basilisk %u") - #:icon "basilisk" - #:categories '("Network" "WebBrowser") - #:mime-type "text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;" - #:startup-notify #f - #:startup-w-m-class "Basilisk"))))))) - (home-page "https://www.basilisk-browser.org/") - (synopsis "A XUL-based web-browser built on top of the Unified XUL Platform (UXP). This browser is a -close twin to pre-Servo Firefox in how it operates.") - (description "Basilisk is a free and Open Source XUL-based web browser, featuring the well-known Firefox-style -interface and operation. It is based on the Goanna layout and rendering engine (a fork of Gecko) and builds on the -Unified XUL Platform (UXP), which in turn is a fork of the Mozilla code base without Servo or Rust.") - (license license:mpl2.0))))) - - - - -(define-public palemoon - (make-palemoon)) - -(define-public basilisk - (make-basilisk)) - -(define-public palemoon/gtk3 - (package - (inherit (make-palemoon #:with-gtk3? #t)) - (name "palemoon-gtk3"))) - -(define-public basilisk/gtk3 - (package - (inherit (make-basilisk #:with-gtk3? #t)) - (name "basilisk-gtk3"))) |