From eb4164e6964c18e46ab2ec460e5db8a75b265438 Mon Sep 17 00:00:00 2001 From: msglm Date: Mon, 26 Feb 2024 03:49:31 -0600 Subject: use snippets instead of patches --- librewolf.scm | 10 +++++-- policies.json | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 policies.json diff --git a/librewolf.scm b/librewolf.scm index 8e53410..45c6224 100644 --- a/librewolf.scm +++ b/librewolf.scm @@ -4,8 +4,8 @@ #:use-module (guix build-system trivial) #:use-module (guix download) #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix gexp) #:use-module (guix packages) + #:use-module (guix gexp) #:use-module (guix utils) #:use-module ((guix build utils) #:select (alist-replace)) #:use-module (gnu packages) @@ -47,6 +47,7 @@ #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) + #:use-module (nongnu packages mozilla) ) ;; Update this id with every firefox update to its release date. @@ -65,12 +66,17 @@ version "/librewolf-" version ".source.tar.gz")) (sha256 (base32 "050kg717jy70fvjfh91aydmq25mqaz6cbf9cqsdsgh6hvpxrw873")) - (patches (search-patches "librewolf-msglm-browser.patch")) )) (arguments (substitute-keyword-arguments (package-arguments firefox-esr) ((#:phases phases) #~(modify-phases #$phases + ;(add-before 'build 'replace-policies + (add-before 'patch-cargo-checksums 'replace-policies + (lambda _ + (copy-file #$(local-file "policies.json") "lw/policies.json")) + ) + (replace 'set-build-id (lambda _ (setenv "MOZ_BUILD_DATE" #$%firefox-build-id))))))) diff --git a/policies.json b/policies.json new file mode 100644 index 0000000..11d270a --- /dev/null +++ b/policies.json @@ -0,0 +1,93 @@ +{ + "__COMMENT__ More Information": "https://github.com/mozilla/policy-templates/blob/master/README.md", + "policies": { + "AppUpdateURL": "https://localhost", + "DisableAppUpdate": true, + "OverrideFirstRunPage": "", + "OverridePostUpdatePage": "", + "DisableSystemAddonUpdate": true, + "DisableProfileImport": false, + "DisableFirefoxStudies": true, + "DisableTelemetry": true, + "DisableFeedbackCommands": true, + "DisablePocket": true, + "DisableSetDesktopBackground": false, + "DisableDeveloperTools": false, + "Homepage": { + "StartPage": "none" + }, + "DNSOverHTTPS": { + "Enabled": false, + "ProviderURL": "", + "Locked": false + }, + "Preferences": { + "toolkit.legacyUserProfileCustomizations.stylesheets": { + "Value": true, + "Status": "user" + }, + "browser.toolbars.bookmarks.visibility": { + "Value": "never", + "Status": "user" + }, + "browser.startup.page": { + "Value": 3, + "Status": "user" + }, + "privacy.clearOnShutdown.history": { + "Value": false, + "Status": "user" + } + }, + "NoDefaultBookmarks": true, + "WebsiteFilter": { + "Block": [ + "https://localhost/*" + ], + "Exceptions": [ + "https://localhost/*" + ] + }, + "Extensions": { + "Install": [ + "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi", + "https://addons.mozilla.org/firefox/downloads/latest/libredirect/latest.xpi", + "https://addons.mozilla.org/firefox/downloads/latest/noscript/latest.xpi", + "https://addons.mozilla.org/firefox/downloads/latest/tree-style-tab/latest.xpi" + ], + "Uninstall": [ + "google@search.mozilla.org", + "bing@search.mozilla.org", + "amazondotcom@search.mozilla.org", + "ebay@search.mozilla.org", + "twitter@search.mozilla.org" + ] + }, + "SearchEngines": { + "PreventInstalls": false, + "Remove": [ + "Google", + "Bing", + "Amazon.com", + "eBay", + "Twitter" + ], + "Default": "SearXNG", + "Add": [ + { + "Name": "SearXNG", + "Description": "A privacy-respecting, hackable metasearch engine", + "Alias": "", + "Method": "POST", + "URLTemplate": "https://searx.techchud.xyz/?q={searchTerms}", + "PostData": "q={searchTerms}&category_general=on", + "IconURL": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIiB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiB4bWxu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