From e0371f9d20bc08b2ac72813e83d1e678442bd30e Mon Sep 17 00:00:00 2001 From: Izorkin Date: Fri, 17 Mar 2023 21:57:25 +0300 Subject: [PATCH] mastodon: 4.1.0 -> 4.1.1 --- pkgs/servers/mastodon/default.nix | 33 +++++++++++++++---------------- pkgs/servers/mastodon/source.nix | 4 ++-- pkgs/servers/mastodon/version.nix | 2 +- 3 files changed, 19 insertions(+), 20 deletions(-) diff --git a/pkgs/servers/mastodon/default.nix b/pkgs/servers/mastodon/default.nix index d942bb0b2e5f..8f34d284df21 100644 --- a/pkgs/servers/mastodon/default.nix +++ b/pkgs/servers/mastodon/default.nix @@ -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 diff --git a/pkgs/servers/mastodon/source.nix b/pkgs/servers/mastodon/source.nix index 891e96d68481..b51afb602c2b 100644 --- a/pkgs/servers/mastodon/source.nix +++ b/pkgs/servers/mastodon/source.nix @@ -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; diff --git a/pkgs/servers/mastodon/version.nix b/pkgs/servers/mastodon/version.nix index c283b30007c5..4a8abaf4eb4b 100644 --- a/pkgs/servers/mastodon/version.nix +++ b/pkgs/servers/mastodon/version.nix @@ -1 +1 @@ -"4.1.0" +"4.1.1"