From d6566228e9ec541f58439ed1ffced634ff9f398f Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Mon, 26 Aug 2024 12:23:46 +0200 Subject: [PATCH] floorp: format with nixfmt-rfc-style Signed-off-by: Christoph Heiss --- .../networking/browsers/floorp/default.nix | 148 +++++++++--------- 1 file changed, 77 insertions(+), 71 deletions(-) diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix index 729471d14b04..4bf93acdac26 100644 --- a/pkgs/applications/networking/browsers/floorp/default.nix +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -1,80 +1,86 @@ -{ stdenv -, lib -, fetchFromGitHub -, fetchpatch -, buildMozillaMach -, nixosTests -, python311 +{ + stdenv, + lib, + fetchFromGitHub, + fetchpatch, + buildMozillaMach, + nixosTests, + python311, }: -((buildMozillaMach rec { - pname = "floorp"; - packageVersion = "11.17.7"; - applicationName = "Floorp"; - binaryName = "floorp"; - branding = "browser/branding/official"; - requireSigning = false; - allowAddonSideload = true; +( + (buildMozillaMach rec { + pname = "floorp"; + packageVersion = "11.17.7"; + applicationName = "Floorp"; + binaryName = "floorp"; + branding = "browser/branding/official"; + requireSigning = false; + allowAddonSideload = true; - # Must match the contents of `browser/config/version.txt` in the source tree - version = "128.2.0"; + # Must match the contents of `browser/config/version.txt` in the source tree + version = "128.2.0"; - src = fetchFromGitHub { - owner = "Floorp-Projects"; - repo = "Floorp"; - fetchSubmodules = true; - rev = "v${packageVersion}"; - hash = "sha256-IAzPt696AWBEyfxR5U5/Isd6urPoi3fHshT+Fl+o/Bg="; - }; + src = fetchFromGitHub { + owner = "Floorp-Projects"; + repo = "Floorp"; + fetchSubmodules = true; + rev = "v${packageVersion}"; + hash = "sha256-IAzPt696AWBEyfxR5U5/Isd6urPoi3fHshT+Fl+o/Bg="; + }; - extraConfigureFlags = [ - "--with-app-name=${pname}" - "--with-app-basename=${applicationName}" - "--with-unsigned-addon-scopes=app,system" - "--enable-proxy-bypass-protection" - ]; + extraConfigureFlags = [ + "--with-app-name=${pname}" + "--with-app-basename=${applicationName}" + "--with-unsigned-addon-scopes=app,system" + "--enable-proxy-bypass-protection" + ]; - extraPostPatch = '' - # Fix .desktop files for PWAs generated by Floorp - # The executable path returned by Services.dirsvc.get() is absolute and - # thus is the full /nix/store/[..] path. To avoid breaking PWAs with each - # update, rely on `floorp` being in $PATH, as before. - substituteInPlace floorp/browser/base/content/modules/ssb/LinuxSupport.mjs \ - --replace-fail 'Services.dirsvc.get("XREExeF",Ci.nsIFile).path' '"floorp"' - ''; + extraPostPatch = '' + # Fix .desktop files for PWAs generated by Floorp + # The executable path returned by Services.dirsvc.get() is absolute and + # thus is the full /nix/store/[..] path. To avoid breaking PWAs with each + # update, rely on `floorp` being in $PATH, as before. + substituteInPlace floorp/browser/base/content/modules/ssb/LinuxSupport.mjs \ + --replace-fail 'Services.dirsvc.get("XREExeF",Ci.nsIFile).path' '"floorp"' + ''; - updateScript = ./update.sh; + updateScript = ./update.sh; - meta = { - description = "Fork of Firefox, focused on keeping the Open, Private and Sustainable Web alive, built in Japan"; - homepage = "https://floorp.app/"; - maintainers = with lib.maintainers; [ christoph-heiss ]; - platforms = lib.platforms.unix; - badPlatforms = lib.platforms.darwin; - broken = stdenv.buildPlatform.is32bit; # since Firefox 60, build on 32-bit platforms fails with "out of memory". - # not in `badPlatforms` because cross-compilation on 64-bit machine might work. - maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115) - license = lib.licenses.mpl20; - mainProgram = "floorp"; - }; - tests = [ nixosTests.floorp ]; -}).override { - # Upstream build configuration can be found at - # .github/workflows/src/linux/shared/mozconfig_linux_base - privacySupport = true; - webrtcSupport = true; - enableOfficialBranding = false; - googleAPISupport = true; - mlsAPISupport = true; -}).overrideAttrs (prev: { - MOZ_DATA_REPORTING = ""; - MOZ_TELEMETRY_REPORTING = ""; + meta = { + description = "Fork of Firefox, focused on keeping the Open, Private and Sustainable Web alive, built in Japan"; + homepage = "https://floorp.app/"; + maintainers = with lib.maintainers; [ christoph-heiss ]; + platforms = lib.platforms.unix; + badPlatforms = lib.platforms.darwin; + broken = stdenv.buildPlatform.is32bit; + # since Firefox 60, build on 32-bit platforms fails with "out of memory". + # not in `badPlatforms` because cross-compilation on 64-bit machine might work. + maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115) + license = lib.licenses.mpl20; + mainProgram = "floorp"; + }; + tests = [ nixosTests.floorp ]; + }).override + { + # Upstream build configuration can be found at + # .github/workflows/src/linux/shared/mozconfig_linux_base + privacySupport = true; + webrtcSupport = true; + enableOfficialBranding = false; + googleAPISupport = true; + mlsAPISupport = true; + } +).overrideAttrs + (prev: { + MOZ_DATA_REPORTING = ""; + MOZ_TELEMETRY_REPORTING = ""; - # Upstream already includes some of the bugfix patches that are applied by - # `buildMozillaMach`. Pick out only the relevant ones for Floorp and override - # the list here. - patches = [ - ../firefox/env_var_for_system_dir-ff111.patch - ../firefox/no-buildconfig-ffx121.patch - ]; -}) + # Upstream already includes some of the bugfix patches that are applied by + # `buildMozillaMach`. Pick out only the relevant ones for Floorp and override + # the list here. + patches = [ + ../firefox/env_var_for_system_dir-ff111.patch + ../firefox/no-buildconfig-ffx121.patch + ]; + })