diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 2bff8d6cfba6..4d5cb720bfdc 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -289,6 +289,7 @@ in { firewall-nftables = handleTest ./firewall.nix { nftables = true; }; fish = handleTest ./fish.nix {}; flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {}; + floorp = handleTest ./firefox.nix { firefoxPackage = pkgs.floorp; }; fluentd = handleTest ./fluentd.nix {}; fluidd = handleTest ./fluidd.nix {}; fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {}; diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index bb4b1ba0a85d..8a9cc71d083f 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -1,5 +1,6 @@ { pname , version +, packageVersion ? version , meta , updateScript ? null , binaryName ? "firefox" @@ -206,7 +207,7 @@ in buildStdenv.mkDerivation { pname = "${pname}-unwrapped"; - inherit version; + version = packageVersion; inherit src unpackPhase meta; @@ -557,7 +558,6 @@ buildStdenv.mkDerivation { passthru = { inherit application extraPatches; inherit updateScript; - inherit version; inherit alsaSupport; inherit binaryName; inherit jackSupport; @@ -569,6 +569,7 @@ buildStdenv.mkDerivation { inherit tests; inherit gtk3; inherit wasiSysRoot; + version = packageVersion; } // extraPassthru; hardeningDisable = [ "format" ]; # -Werror=format-security diff --git a/pkgs/applications/networking/browsers/floorp/default.nix b/pkgs/applications/networking/browsers/floorp/default.nix new file mode 100644 index 000000000000..c144704fa13f --- /dev/null +++ b/pkgs/applications/networking/browsers/floorp/default.nix @@ -0,0 +1,49 @@ +{ stdenv +, lib +, fetchFromGitHub +, buildMozillaMach +, nixosTests +}: + +((buildMozillaMach rec { + pname = "floorp"; + packageVersion = "11.5.0"; + applicationName = "Floorp"; + binaryName = "floorp"; + version = "155.4.0"; + + src = fetchFromGitHub { + owner = "Floorp-Projects"; + repo = "Floorp"; + fetchSubmodules = true; + rev = "v${packageVersion}"; + hash = "sha256-adK3LAu3cDh6d+GvtnkWmSnxansnSZoIgtA9TAqIMyA="; + }; + + extraConfigureFlags = [ + "--with-app-name=${pname}" + "--with-app-basename=${applicationName}" + "--with-branding=browser/branding/official" + "--with-distribution-id=app.floorp.Floorp" + "--with-unsigned-addon-scopes=app,system" + "--allow-addon-sideload" + ]; + + meta = { + description = "A 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; + }; + tests = [ nixosTests.floorp ]; +}).override { + privacySupport = true; + enableOfficialBranding = false; +}).overrideAttrs (prev: { + MOZ_REQUIRE_SIGNING = ""; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 37d825819122..26fd35bf312c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31944,6 +31944,10 @@ with pkgs; flex-ndax = callPackage ../applications/radio/flex-ndax { }; + floorp-unwrapped = callPackage ../applications/networking/browsers/floorp { }; + + floorp = wrapFirefox floorp-unwrapped { }; + fluxbox = callPackage ../applications/window-managers/fluxbox { }; hackedbox = callPackage ../applications/window-managers/hackedbox { };