git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #34849 from oxij/pkgs/firefoxes

pkgs: firefoxes and tor-browsers

commit2bfda206c4246ab815aa63c933fa236c1725a6a2 authorJoachim F <joachifm@users.noreply.github.com> dateMon 12 Feb 2018, 11:15 (9 years ago) parent040bde95e41e65
2 files changed+41−37
pkgs/applications/networking/browsers/firefox/common.nix+25−19 pkgs/applications/networking/browsers/firefox/packages.nix+16−18
pkgs/applications/networking/browsers/firefox/common.nix+25−19
@@ -59,7 +59,7 @@
5959, enableOfficialBranding ? true
6060}:
6161
62−assert stdenv.cc ? libc && stdenv.cc.libc != null;
62+assert stdenv.cc.libc or null != null;
6363
6464let
6565 flag = tf: x: [(if tf then "--enable-${x}" else "--disable-${x}")];
@@ -100,29 +100,25 @@ stdenv.mkDerivation (rec {
100100 rm -f configure
101101 rm -f js/src/configure
102102 rm -f .mozconfig*
103+ '' + (if lib.versionAtLeast version "58"
104+ # this will run autoconf213
105+ then ''
106+ configureScript="$(realpath ./mach) configure"
107+ '' else ''
108+ make -f client.mk configure-files
109+ configureScript="$(realpath ./configure)"
110+ '') + ''
111+ cxxLib=$( echo -n ${gcc}/include/c++/* )
112+ archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine )
103113
104− '' + lib.optionalString (stdenv.lib.versionAtLeast version "58.0.0") ''
105− cat >.mozconfig <<END_MOZCONFIG
106− ${lib.concatStringsSep "\n" (map (flag: "ac_add_options ${flag}") configureFlags)}
107− ${lib.optionalString googleAPISupport "ac_add_options --with-google-api-keyfile=$TMPDIR/ga"}
108− END_MOZCONFIG
114+ test -f layout/style/ServoBindings.toml && sed -i -e '/"-DMOZ_STYLO"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml
109115 '' + lib.optionalString googleAPISupport ''
110116 # Google API key used by Chromium and Firefox.
111117 # Note: These are for NixOS/nixpkgs use ONLY. For your own distribution,
112118 # please get your own set of keys.
113119 echo "AIzaSyDGi15Zwl11UNe6Y-5XW_upsfyw31qwZPI" > $TMPDIR/ga
114120 configureFlagsArray+=("--with-google-api-keyfile=$TMPDIR/ga")
115− '' + ''
116− # this will run autoconf213
117− ${if (stdenv.lib.versionAtLeast version "58.0.0") then "./mach configure" else "make -f client.mk configure-files"}
118−
119− configureScript="$(realpath ./configure)"
120−
121− cxxLib=$( echo -n ${gcc}/include/c++/* )
122− archLib=$cxxLib/$( ${gcc}/bin/gcc -dumpmachine )
123−
124− test -f layout/style/ServoBindings.toml && sed -i -e '/"-DMOZ_STYLO"/ a , "-cxx-isystem", "'$cxxLib'", "-isystem", "'$archLib'"' layout/style/ServoBindings.toml
125−
121+ '' + lib.optionalString (lib.versionOlder version "58") ''
126122 cd obj-*
127123 '';
128124
@@ -150,12 +146,12 @@ stdenv.mkDerivation (rec {
150146 "--disable-gconf"
151147 "--enable-default-toolkit=cairo-gtk${if gtk3Support then "3" else "2"}"
152148 ]
153− ++ lib.optionals (stdenv.lib.versionAtLeast version "56" && !stdenv.hostPlatform.isi686) [
149+ ++ lib.optionals (lib.versionAtLeast version "56" && !stdenv.hostPlatform.isi686) [
154150 # on i686-linux: --with-libclang-path is not available in this configuration
155151 "--with-libclang-path=${llvmPackages.libclang}/lib"
156152 "--with-clang-path=${llvmPackages.clang}/bin/clang"
157153 ]
158− ++ lib.optionals (stdenv.lib.versionAtLeast version "57") [
154+ ++ lib.optionals (lib.versionAtLeast version "57") [
159155 "--enable-webrender=build"
160156 ]
161157
@@ -196,6 +192,16 @@ stdenv.mkDerivation (rec {
196192 ++ lib.optional enableOfficialBranding "--enable-official-branding"
197193 ++ extraConfigureFlags;
198194
195+ # Before 58 we have to run `make -f client.mk configure-files` at
196+ # the top level, and then run `./configure` in the obj-* dir (see
197+ # above), but in 58 we have to instead run `./mach configure` at the
198+ # top level and then run `make` in obj-*. (We can also run the
199+ # `make` at the top level in 58, but then we would have to `cd` to
200+ # `make install` anyway. This is ugly, but simple.)
201+ postConfigure = lib.optionalString (lib.versionAtLeast version "58") ''
202+ cd obj-*
203+ '';
204+
199205 preBuild = lib.optionalString (enableOfficialBranding && isTorBrowserLike) ''
200206 buildFlagsArray=("MOZ_APP_DISPLAYNAME=Tor Browser")
201207 '';
pkgs/applications/networking/browsers/firefox/packages.nix+16−18
@@ -99,44 +99,42 @@ rec {
9999
100100in rec {
101101
102− tor-browser-6-5 = common (rec {
102+ tor-browser-7-0 = common (rec {
103103 pname = "tor-browser";
104− version = "6.5.2";
104+ version = "7.0.1";
105105 isTorBrowserLike = true;
106− extraConfigureFlags = [ "--disable-loop" ];
107106
108107 # FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
109108 src = fetchFromGitHub {
110109 owner = "SLNOS";
111− repo = "tor-browser";
112− # branch "tor-browser-45.8.0esr-6.5-2-slnos"
113− rev = "e4140ea01b9906934f0347e95f860cec207ea824";
114− sha256 = "0a1qk3a9a3xxrl56bp4zbknbchv5x17k1w5kgcf4j3vklcv6av60";
110+ repo = "tor-browser";
111+ # branch "tor-browser-52.5.0esr-7.0-1-slnos";
112+ rev = "830ff8d622ef20345d83f386174f790b0fc2440d";
113+ sha256 = "169mjkr0bp80yv9nzza7kay7y2k03lpnx71h4ybcv9ygxgzdgax5";
115114 };
116− } // commonAttrs) {
117− stdenv = overrideCC stdenv gcc5;
118− ffmpegSupport = false;
119− gssSupport = false;
120− };
121115
122− tor-browser-7-0 = common (rec {
116+ patches =
117+ [ ./env_var_for_system_dir.patch ];
118+ } // commonAttrs) {};
119+
120+ tor-browser-7-5 = common (rec {
123121 pname = "tor-browser";
124− version = "7.0.1";
122+ version = "7.5.2";
125123 isTorBrowserLike = true;
126124
127125 # FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
128126 src = fetchFromGitHub {
129127 owner = "SLNOS";
130128 repo = "tor-browser";
131− # branch "tor-browser-52.5.0esr-7.0-1-slnos";
132− rev = "830ff8d622ef20345d83f386174f790b0fc2440d";
133− sha256 = "169mjkr0bp80yv9nzza7kay7y2k03lpnx71h4ybcv9ygxgzdgax5";
129+ # branch "tor-browser-52.6.2esr-7.5-2-slnos";
130+ rev = "cf1a504aaa26af962ae909a3811c0038db2d2eec";
131+ sha256 = "0llbk7skh1n7yj137gv7rnxfasxsnvfjp4ss7h1fbdnw19yba115";
134132 };
135133
136134 patches =
137135 [ ./env_var_for_system_dir.patch ];
138136 } // commonAttrs) {};
139137
140− tor-browser = tor-browser-7-0;
138+ tor-browser = tor-browser-7-5;
141139
142140})