palemoon: 29.1.1 -> 29.2.0

This commit is contained in:
OPNA2608 2021-04-29 12:51:10 +02:00
parent ba6f0e8f03
commit 668264d220
2 changed files with 106 additions and 33 deletions

View File

@ -1,29 +1,59 @@
{ stdenv, lib, fetchFromGitHub, writeScript, desktop-file-utils # Compiler in stdenv MUST be a supported one for official branding
, pkg-config, autoconf213, alsaLib, bzip2, cairo # See https://developer.palemoon.org/build/linux/
, dbus, dbus-glib, ffmpeg, file, fontconfig, freetype # TODO assert if stdenv.cc is supported?
, gnome2, gnum4, gtk2, hunspell, libevent, libjpeg { stdenv
, libnotify, libstartup_notification, wrapGAppsHook , lib
, libGLU, libGL, perl, python2, libpulseaudio , fetchFromGitHub
, unzip, xorg, wget, which, yasm, zip, zlib , writeScript
, alsaLib
, withGTK3 ? true, gtk3 , autoconf213
, cairo
, desktop-file-utils
, dbus
, dbus-glib
, ffmpeg
, fontconfig
, freetype
, gnome2
, gnum4
, gtk2
, libevent
, libGL
, libGLU
, libnotify
, libpulseaudio
, libstartup_notification
, perl
, pkg-config
, python2
, unzip
, which
, wrapGAppsHook
, xorg
, yasm
, zip
, zlib
, withGTK3 ? true
, gtk3
}: }:
let let
libPath = lib.makeLibraryPath [
libPath = lib.makeLibraryPath [ ffmpeg libpulseaudio ]; ffmpeg
libpulseaudio
];
gtkVersion = if withGTK3 then "3" else "2"; gtkVersion = if withGTK3 then "3" else "2";
in
in stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "palemoon"; pname = "palemoon";
version = "29.1.1"; version = "29.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
githubBase = "repo.palemoon.org"; githubBase = "repo.palemoon.org";
owner = "MoonchildProductions"; owner = "MoonchildProductions";
repo = "Pale-Moon"; repo = "Pale-Moon";
rev = "${version}_Release"; rev = "${version}_Release";
sha256 = "1ppdmj816zwccb0l0mgpq14ckdwg785wmqz41wran0nl63fg6i1x"; sha256 = "0pa9j41bbfarwi60a6hxi5vpn52mwgr4p05l98acv4fcs1ccb427";
fetchSubmodules = true; fetchSubmodules = true;
}; };
@ -43,24 +73,55 @@ in stdenv.mkDerivation rec {
''; '';
nativeBuildInputs = [ nativeBuildInputs = [
desktop-file-utils file gnum4 perl pkg-config python2 wget which wrapGAppsHook unzip autoconf213
desktop-file-utils
gnum4
perl
pkg-config
python2
unzip
which
wrapGAppsHook
yasm
zip
]; ];
buildInputs = [ buildInputs = [
alsaLib bzip2 cairo dbus dbus-glib ffmpeg fontconfig freetype alsaLib
gnome2.GConf gtk2 hunspell libevent libjpeg libnotify cairo
libstartup_notification libGLU libGL dbus
libpulseaudio yasm zip zlib dbus-glib
ffmpeg
fontconfig
freetype
gnome2.GConf
gtk2
libevent
libGL
libGLU
libnotify
libpulseaudio
libstartup_notification
zlib
] ]
++ (with xorg; [ ++ (with xorg; [
libX11 libXext libXft libXi libXrender libXScrnSaver libX11
libXt pixman xorgproto libXext
libXft
libXi
libXrender
libXScrnSaver
libXt
pixman
xorgproto
]) ])
++ lib.optional withGTK3 gtk3; ++ lib.optional withGTK3 gtk3;
enableParallelBuilding = true; enableParallelBuilding = true;
configurePhase = '' configurePhase = ''
runHook preConfigure
export MOZCONFIG=$PWD/mozconfig export MOZCONFIG=$PWD/mozconfig
export MOZ_NOSPAM=1 export MOZ_NOSPAM=1
@ -96,9 +157,6 @@ in stdenv.mkDerivation rec {
ac_add_options --enable-official-branding ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1 export MOZILLA_OFFICIAL=1
# For versions after 28.12.0
ac_add_options --enable-phoenix-extensions
ac_add_options --x-libraries=${lib.makeLibraryPath [ xorg.libX11 ]} ac_add_options --x-libraries=${lib.makeLibraryPath [ xorg.libX11 ]}
export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
@ -112,24 +170,42 @@ in stdenv.mkDerivation rec {
mk_add_options MOZ_MAKE_FLAGS="-j${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"}" mk_add_options MOZ_MAKE_FLAGS="-j${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"}"
mk_add_options AUTOCONF=${autoconf213}/bin/autoconf mk_add_options AUTOCONF=${autoconf213}/bin/autoconf
' '
runHook postConfigure
''; '';
buildPhase = "./mach build"; buildPhase = ''
runHook preBuild
./mach build
runHook postBuild
'';
installPhase = '' installPhase = ''
runHook preInstall
./mach install ./mach install
# Fix missing icon due to wrong WMClass # Fix missing icon due to wrong WMClass
# TODO report upstream
substituteInPlace ./palemoon/branding/official/palemoon.desktop \ substituteInPlace ./palemoon/branding/official/palemoon.desktop \
--replace 'StartupWMClass="pale moon"' 'StartupWMClass=Pale moon' --replace 'StartupWMClass="pale moon"' 'StartupWMClass=Pale moon'
desktop-file-install --dir=$out/share/applications \ desktop-file-install --dir=$out/share/applications \
./palemoon/branding/official/palemoon.desktop ./palemoon/branding/official/palemoon.desktop
# Install official branding icons
for iconname in default{16,22,24,32,48,256} mozicon128; do for iconname in default{16,22,24,32,48,256} mozicon128; do
n=''${iconname//[^0-9]/} n=''${iconname//[^0-9]/}
size=$n"x"$n size=$n"x"$n
install -Dm644 ./palemoon/branding/official/$iconname.png $out/share/icons/hicolor/$size/apps/palemoon.png install -Dm644 ./palemoon/branding/official/$iconname.png $out/share/icons/hicolor/$size/apps/palemoon.png
done done
# Remove unneeded SDK data from installation
# TODO: move to a separate output?
rm -rf $out/{include,share/idl,lib/palemoon-devel-${version}}
runHook postInstall
''; '';
dontWrapGApps = true; dontWrapGApps = true;
@ -154,9 +230,9 @@ in stdenv.mkDerivation rec {
experience, while offering full customization and a growing collection of experience, while offering full customization and a growing collection of
extensions and themes to make the browser truly your own. extensions and themes to make the browser truly your own.
''; '';
homepage = "https://www.palemoon.org/"; homepage = "https://www.palemoon.org/";
license = licenses.mpl20; license = licenses.mpl20;
maintainers = with maintainers; [ AndersonTorres OPNA2608 ]; maintainers = with maintainers; [ AndersonTorres OPNA2608 ];
platforms = [ "i686-linux" "x86_64-linux" ]; platforms = [ "i686-linux" "x86_64-linux" ];
}; };
} }

View File

@ -25232,10 +25232,7 @@ in
osmscout-server = libsForQt5.callPackage ../applications/misc/osmscout-server { }; osmscout-server = libsForQt5.callPackage ../applications/misc/osmscout-server { };
palemoon = callPackage ../applications/networking/browsers/palemoon { palemoon = callPackage ../applications/networking/browsers/palemoon { };
# https://developer.palemoon.org/build/linux/
stdenv = gcc8Stdenv;
};
webbrowser = callPackage ../applications/networking/browsers/webbrowser {}; webbrowser = callPackage ../applications/networking/browsers/webbrowser {};