From 26f6fabcfe78b968dd2baa9b21e9fe66618243a6 Mon Sep 17 00:00:00 2001 From: Jan Malakhovski Date: Thu, 31 Jan 2019 16:38:01 +0000 Subject: [PATCH] firefoxPackages: move nixpkgsPatches into common.nix --- .../networking/browsers/firefox/common.nix | 9 ++++++++- .../networking/browsers/firefox/packages.nix | 16 +++++----------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 62074441d8cc..2ef05a8f8d4b 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -88,13 +88,20 @@ let browserVersion = if isIceCatLike then icversion else if isTorBrowserLike then tbversion else ffversion; + + browserPatches = [ + ./env_var_for_system_dir.patch + ] ++ patches; + in stdenv.mkDerivation rec { name = "${pname}-unwrapped-${version}"; version = browserVersion; - inherit src unpackPhase patches meta; + inherit src unpackPhase meta; + + patches = browserPatches; # Ignore trivial whitespace changes in patches, this fixes compatibility of # ./env_var_for_system_dir.patch with Firefox >=65 without having to track diff --git a/pkgs/applications/networking/browsers/firefox/packages.nix b/pkgs/applications/networking/browsers/firefox/packages.nix index 4ff455b3481e..6a2f2ed4efd2 100644 --- a/pkgs/applications/networking/browsers/firefox/packages.nix +++ b/pkgs/applications/networking/browsers/firefox/packages.nix @@ -4,10 +4,6 @@ let common = opts: callPackage (import ./common.nix opts) {}; - nixpkgsPatches = [ - ./env_var_for_system_dir.patch - ]; - in rec { @@ -20,7 +16,7 @@ rec { sha512 = "39bx76whgf53rkfqqy8gfhd44wikh89zpnqr930v4grqg3v0pfr8mbvp7xzjjlf5r7bski0wxibn9vyyy273fp99zyj1w2m5ihh9aqh"; }; - patches = nixpkgsPatches ++ [ + patches = [ ./no-buildconfig-ffx65.patch ]; @@ -52,7 +48,7 @@ rec { sha512 = "bfca42668ca78a12a9fb56368f4aae5334b1f7a71966fbba4c32b9c5e6597aac79a6e340ac3966779d2d5563eb47c054ab33cc40bfb7306172138ccbd3adb2b9"; }; - patches = nixpkgsPatches ++ [ + patches = [ # this one is actually an omnipresent bug # https://bugzilla.mozilla.org/show_bug.cgi?id=1444519 ./fix-pa-context-connect-retval.patch @@ -77,7 +73,7 @@ rec { sha512 = "3n7l146gdjwhi0iq85awc0yykvi4x5m91mcylxa5mrq911bv6xgn2i92nzhgnhdilqap5218778vgvnalikzsh67irrncx1hy5f6iyx"; }; - patches = nixpkgsPatches ++ [ + patches = [ ./no-buildconfig-ffx65.patch # this one is actually an omnipresent bug @@ -146,7 +142,7 @@ in rec { sha256 = "0icnl64nxcyf7dprpdpygxhabsvyhps8c3ixysj9bcdlj9q34ib1"; }; - patches = nixpkgsPatches ++ [ + patches = [ ./no-buildconfig.patch ]; }; @@ -161,7 +157,7 @@ in rec { sha256 = "09fn54glqg1aa93hnz5zdcy07cps09dbni2b4200azh6nang630a"; }; - patches = nixpkgsPatches ++ [ + patches = [ # this one is actually an omnipresent bug # https://bugzilla.mozilla.org/show_bug.cgi?id=1444519 ./fix-pa-context-connect-retval.patch @@ -187,8 +183,6 @@ in rec { find . -exec touch -d'2010-01-01 00:00' {} \; ''; - patches = nixpkgsPatches; - meta = (args.meta or {}) // { description = "A web browser built from TorBrowser source tree"; longDescription = ''