diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-08-17 05:01:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 05:01:57 -0400 |
commit | 1219001ff7e96a93dd719581fe97e890c62065cf (patch) | |
tree | 82fe3027e0310d4635b78ff3b8f94cedf3207eda /pkgs/applications/networking/browsers | |
parent | 5653cd1e00b45db1ce3613d69e0bd404eb4c1d71 (diff) | |
parent | a5ffb7cf8a0af97bd4302d1ab27fd8cf3a16f6f3 (diff) |
Merge pull request #93407 from OPNA2608/update-palemoon-28.11.0
palemoon: 28.10.0 -> 28.12.0
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r-- | pkgs/applications/networking/browsers/palemoon/default.nix | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/pkgs/applications/networking/browsers/palemoon/default.nix b/pkgs/applications/networking/browsers/palemoon/default.nix index 911030dee5319..c59d23ecdba11 100644 --- a/pkgs/applications/networking/browsers/palemoon/default.nix +++ b/pkgs/applications/networking/browsers/palemoon/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchgit, makeDesktopItem +{ stdenv, lib, fetchFromGitHub, writeScript, desktop-file-utils , pkgconfig, autoconf213, alsaLib, bzip2, cairo , dbus, dbus-glib, ffmpeg_3, file, fontconfig, freetype , gnome2, gnum4, gtk2, hunspell, libevent, libjpeg @@ -16,35 +16,33 @@ let in stdenv.mkDerivation rec { pname = "palemoon"; - version = "28.10.0"; + version = "28.12.0"; - src = fetchgit { - url = "https://github.com/MoonchildProductions/Pale-Moon.git"; + src = fetchFromGitHub { + owner = "MoonchildProductions"; + repo = "Pale-Moon"; rev = "${version}_Release"; - sha256 = "0c64vmrp46sbl1dgl9dq2vkmpgz9gvgd59dk02jqwyhx4lln1g2l"; + sha256 = "1cc75972nhmxkkynkky1m2fijbf3qlzvpxsd98mxlx0b7h4d3l5l"; fetchSubmodules = true; }; - desktopItem = makeDesktopItem { - name = "palemoon"; - exec = "palemoon %U"; - icon = "palemoon"; - desktopName = "Pale Moon"; - genericName = "Web Browser"; - categories = "Network;WebBrowser;"; - mimeType = lib.concatStringsSep ";" [ - "text/html" - "text/xml" - "application/xhtml+xml" - "application/vnd.mozilla.xul+xml" - "x-scheme-handler/http" - "x-scheme-handler/https" - "x-scheme-handler/ftp" - ]; - }; + passthru.updateScript = writeScript "update-${pname}" '' + #!/usr/bin/env nix-shell + #!nix-shell -i bash -p common-updater-scripts curl libxml2 + + set -eu -o pipefail + + # Only release note announcement == finalized release + version="$( + curl -s 'http://www.palemoon.org/releasenotes.shtml' | + xmllint --html --xpath 'html/body/table/tbody/tr/td/h3/text()' - 2>/dev/null | head -n1 | + sed 's/v\(\S*\).*/\1/' + )" + update-source-version ${pname} "$version" + ''; nativeBuildInputs = [ - file gnum4 makeWrapper perl pkgconfig python2 wget which + desktop-file-utils file gnum4 makeWrapper perl pkgconfig python2 wget which ]; buildInputs = [ @@ -106,7 +104,7 @@ in stdenv.mkDerivation rec { ac_add_options --prefix=$out - mk_add_options MOZ_MAKE_FLAGS="-j$NIX_BUILD_CORES" + mk_add_options MOZ_MAKE_FLAGS="-j${if enableParallelBuilding then "$NIX_BUILD_CORES" else "1"}" mk_add_options AUTOCONF=${autoconf213}/bin/autoconf ' ''; @@ -116,14 +114,13 @@ in stdenv.mkDerivation rec { installPhase = '' $src/mach install - mkdir -p $out/share/applications - cp ${desktopItem}/share/applications/* $out/share/applications + desktop-file-install --dir=$out/share/applications \ + $src/palemoon/branding/official/palemoon.desktop - for n in 16 22 24 32 48 256; do + for iconname in default{16,22,24,32,48,256} mozicon128; do + n=''${iconname//[^0-9]/} size=$n"x"$n - mkdir -p $out/share/icons/hicolor/$size/apps - cp $src/palemoon/branding/official/default$n.png \ - $out/share/icons/hicolor/$size/apps/palemoon.png + install -Dm644 $src/palemoon/branding/official/$iconname.png $out/share/icons/hicolor/$size/apps/palemoon.png done wrapProgram $out/lib/palemoon-${version}/palemoon \ |