From d47b1a608ad97ccd20aa0e54b534eb0190ec485a Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 20 Sep 2017 20:39:03 +0200 Subject: [PATCH] add nix expression --- default.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..8b65124 --- /dev/null +++ b/default.nix @@ -0,0 +1,37 @@ +{ pkgs ? import { } }: + +let + firefox = pkgs.firefox-unwrapped.override { + gtk3Support = true; + enableOfficialBranding = true; + privacySupport = true; + geolocationSupport = false; + pulseaudioSupport = false; + }; + + patched = firefox.overrideDerivation (base: { + patches = [ + ./disable-datasharing-infobar.patch + ./disable-locationservice.patch + ./disable-sponsored-tiles.patch + ./disable-telemetry.patch + ./disable-reader.patch + ./disable-pocket.patch + ./preferences.patch + ]; + postPatch = '' + sed -e '/browser\/extensions/d' \ + -e '/browser\/features/d' \ + -e '/pdfjs/d' \ + -i browser/installer/package-manifest.in + : > browser/extensions/moz.build + ''; + configureFlags = base.configureFlags ++ [ + "--disable-dbus" + "--disable-gconf" + "--disable-eme" + ]; + }); + +in + pkgs.wrapFirefox patched { }