mastodon: apply upstream patch for CVE-2022-0432

4d6d4b43c6

Co-authored-by: Robert Scott <github@humanleg.org.uk>
This commit is contained in:
Kerstin Humm 2022-02-18 17:08:57 +01:00
parent 4150bf02b5
commit a8121ca80e
No known key found for this signature in database
GPG Key ID: 40293358C7B9326B

View File

@ -1,4 +1,4 @@
{ lib, stdenv, nodejs-slim, mkYarnPackage, fetchFromGitHub, bundlerEnv
{ lib, stdenv, nodejs-slim, mkYarnPackage, fetchFromGitHub, fetchpatch, bundlerEnv
, yarn, callPackage, imagemagick, ffmpeg, file, ruby_3_0, writeShellScript
# Allow building a fork or custom version of Mastodon:
@ -15,6 +15,14 @@ stdenv.mkDerivation rec {
# Putting the callPackage up in the arguments list also does not work.
src = if srcOverride != null then srcOverride else callPackage ./source.nix {};
patches = [
(fetchpatch {
name = "CVE-2022-0432.patch";
url = "https://github.com/mastodon/mastodon/commit/4d6d4b43c6186a13e67b92eaf70fe1b70ea24a09.patch";
sha256 = "sha256-C18X2ErBqP/dIEt8NrA7hdiqxUg5977clouuu7Lv4/E=";
})
];
mastodon-gems = bundlerEnv {
name = "${pname}-gems-${version}";
inherit version;