wow
This commit is contained in:
commit
7467b40e30
7 changed files with 393 additions and 0 deletions
90
pkgs/waterfox/default.nix
Normal file
90
pkgs/waterfox/default.nix
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/**
|
||||
* @name waterfox
|
||||
* @author paring
|
||||
* @source https://git.pari.ng/paring/nix-packages/src/commit/2a2a6be44cc2ffc6b51a609732e506ed9964a1bb/pkg/waterfox
|
||||
*/
|
||||
{
|
||||
apple-sdk_15,
|
||||
fetchFromGitHub,
|
||||
lib,
|
||||
nixosTests,
|
||||
nix-update-script,
|
||||
sccache,
|
||||
stdenv,
|
||||
buildMozillaMach,
|
||||
}:
|
||||
let
|
||||
waterfox = buildMozillaMach rec {
|
||||
pname = "waterfox";
|
||||
version = "6.6.9";
|
||||
applicationName = "Waterfox";
|
||||
binaryName = "waterfox";
|
||||
branding = "waterfox/browser/branding";
|
||||
src = fetchFromGitHub {
|
||||
owner = "BrowserWorks";
|
||||
repo = "Waterfox";
|
||||
tag = version;
|
||||
hash = "sha256-mrbXjztb4+qUnXEB/WrXN0x6AiBjz7yPqLwTuqeQfUg=";
|
||||
fetchSubmodules = true;
|
||||
preFetch = ''
|
||||
export GIT_CONFIG_COUNT=1
|
||||
export GIT_CONFIG_KEY_0=url.https://github.com/.insteadOf
|
||||
export GIT_CONFIG_VALUE_0=git@github.com:
|
||||
''; # We can't clone with SSH here
|
||||
};
|
||||
|
||||
extraBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
apple-sdk_15 # Browser requires sdk 15+ to work on darwin
|
||||
];
|
||||
|
||||
extraConfigureFlags = [
|
||||
"--with-app-basename=${applicationName}"
|
||||
];
|
||||
|
||||
extraPatches = [
|
||||
./remove-missing-icons.patch
|
||||
]; # Some of the icons are missing and cause the build to crash. Removing them fixes the issue
|
||||
|
||||
extraPostPatch = ''
|
||||
rm .mozconfig .mozconfig-*
|
||||
|
||||
echo 'export CCACHE_CPP2=yes' >> .mozconfig
|
||||
echo 'export RUSTC_WRAPPER=sccache' >> .mozconfig
|
||||
echo 'ac_add_options --with-ccache=sccache' >> .mozconfig
|
||||
''; # buildMozillaMach will take care of the build arguments
|
||||
|
||||
meta = {
|
||||
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.
|
||||
changelog = "https://github.com/BrowserWorks/waterfox/releases/tag/${version}";
|
||||
description = "A privacy-focused Firefox Fork";
|
||||
homepage = "https://www.waterfox.com";
|
||||
license = lib.licenses.mpl20;
|
||||
mainProgram = "waterfox";
|
||||
# maintainers = with lib.maintainers; [
|
||||
# aurelivia
|
||||
# ethancedwards8 # Darwin
|
||||
# hythera
|
||||
# ];
|
||||
maxSilent = 14400; # 4h, double the default of 7200s (c.f. #129212, #129115)
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
tests = { inherit (nixosTests) waterfox; };
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
in
|
||||
waterfox.overrideAttrs (prev: {
|
||||
nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ [
|
||||
sccache
|
||||
];
|
||||
|
||||
preConfigure = (prev.preConfigure or "") + ''
|
||||
export SCCACHE_DIR=/var/cache/sccache/waterfox
|
||||
export SCCACHE_IDLE_TIMEOUT=0
|
||||
export SCCACHE_CACHE_SIZE=64G
|
||||
export SCCACHE_ERROR_LOG=/var/cache/sccache/waterfox.log
|
||||
|
||||
sccache -s
|
||||
'';
|
||||
})
|
||||
18
pkgs/waterfox/remove-missing-icons.patch
Normal file
18
pkgs/waterfox/remove-missing-icons.patch
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
||||
index 64d9993530c3..8f107b65c5be 100644
|
||||
--- a/browser/installer/package-manifest.in
|
||||
+++ b/browser/installer/package-manifest.in
|
||||
@@ -222,13 +222,10 @@
|
||||
@RESPATH@/chrome/toolkit.manifest
|
||||
#ifdef MOZ_GTK
|
||||
@RESPATH@/browser/chrome/icons/default/default16.png
|
||||
-@RESPATH@/browser/chrome/icons/default/default22.png
|
||||
-@RESPATH@/browser/chrome/icons/default/default24.png
|
||||
@RESPATH@/browser/chrome/icons/default/default32.png
|
||||
@RESPATH@/browser/chrome/icons/default/default48.png
|
||||
@RESPATH@/browser/chrome/icons/default/default64.png
|
||||
@RESPATH@/browser/chrome/icons/default/default128.png
|
||||
-@RESPATH@/browser/chrome/icons/default/default256.png
|
||||
#endif
|
||||
|
||||
; [DevTools Startup Files]
|
||||
Loading…
Add table
Add a link
Reference in a new issue