Unverified Commit 56c62c8f authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #221709 from Izorkin/update-mastodon

parents 803fcdfa e0371f9d
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
@@ -72,15 +72,13 @@ stdenv.mkDerivation rec {
      rm -rf ~/node_modules/.cache

      # Create missing static gzip and brotli files
      gzip -9 -n -c ~/public/assets/500.html > ~/public/assets/500.html.gz
      gzip -9 -n -c ~/public/packs/report.html > ~/public/packs/report.html.gz
      find ~/public/assets -maxdepth 1 -type f -name ".*.json" | while read file; do
        gzip -9 -n -c $file > $file.gz
      done
      brotli --best -f ~/public/packs/report.html -o ~/public/packs/report.html.br
      find ~/public/assets -type f -regextype posix-extended -iregex '.*\.(css|js|json|html)' | while read file; do
        brotli --best -f $file -o $file.br
      done
      gzip --best --keep ~/public/assets/500.html
      gzip --best --keep ~/public/packs/report.html
      find ~/public/assets -maxdepth 1 -type f -name '.*.json' \
        -exec gzip --best --keep --force {} ';'
      brotli --best --keep ~/public/packs/report.html
      find ~/public/assets -type f -regextype posix-extended -iregex '.*\.(css|js|json|html)' \
        -exec brotli --best --keep {} ';'
    '';

    installPhase = ''
@@ -107,15 +105,16 @@ stdenv.mkDerivation rec {
      fi
    done

    # Remove execute permissions
    chmod 0444 public/emoji/*.svg

    # Create missing static gzip and brotli files
    find public -maxdepth 1 -type f -regextype posix-extended -iregex '.*\.(css|js|svg|txt|xml)' | while read file; do
      gzip -9 -n -c $file > $file.gz
      brotli --best -f $file -o $file.br
    done
    find public/emoji -type f -name "*.svg" | while read file; do
      gzip -9 -n -c $file > $file.gz
      brotli --best -f $file -o $file.br
    done
    find public -maxdepth 1 -type f -regextype posix-extended -iregex '.*\.(css|js|svg|txt|xml)' \
      -exec gzip --best --keep --force {} ';' \
      -exec brotli --best --keep {} ';'
    find public/emoji -type f -name '.*.svg' \
      -exec gzip --best --keep --force {} ';' \
      -exec brotli --best --keep {} ';'
    ln -s assets/500.html.gz public/500.html.gz
    ln -s assets/500.html.br public/500.html.br
    ln -s packs/sw.js.gz public/sw.js.gz
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
{ fetchgit, applyPatches }: let
  src = fetchgit {
    url = "https://github.com/mastodon/mastodon.git";
    rev = "v4.1.0";
    sha256 = "00nc80s1hz4sdpq81hsv2r9da3bjn4lgwpk7w24zy2016iwjjwbb";
    rev = "v4.1.1";
    sha256 = "1c0mxz45pkgmyw81z025n1ps1dkdq92337h7sd865w2fbgmzg50l";
  };
in applyPatches {
  inherit src;
+1 −1
Original line number Diff line number Diff line
"4.1.0"
"4.1.1"