From f7d796429980c38cff1aa86a2cb568e3338afd17 Mon Sep 17 00:00:00 2001 From: Akshay Mankar Date: Fri, 16 Feb 2024 13:21:48 +0100 Subject: [PATCH] security: Upgrade mastodon to 4.2.7 --- flake.lock | 17 +++++++++++++++++ flake.nix | 2 ++ overlays/default.nix | 15 +++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/flake.lock b/flake.lock index 08f91e4..77560c0 100644 --- a/flake.lock +++ b/flake.lock @@ -285,6 +285,22 @@ "type": "github" } }, + "nixpkgs-head": { + "locked": { + "lastModified": 1708085481, + "narHash": "sha256-6pi0YjrW5yZIvjhrIkME4IgFBljsCZArkCSJeEd+W0o=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8ecf09944fe1cf1ce5b08d34dbcd134e5764f0f1", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-lib": { "locked": { "dir": "lib", @@ -315,6 +331,7 @@ "nixos-flake": "nixos-flake", "nixpkgs": "nixpkgs", "nixpkgs-2205": "nixpkgs-2205", + "nixpkgs-head": "nixpkgs-head", "triton-vmtools": "triton-vmtools", "unstable": "unstable" } diff --git a/flake.nix b/flake.nix index e0c3b49..967f536 100644 --- a/flake.nix +++ b/flake.nix @@ -6,6 +6,8 @@ nixpkgs-2205.url = "github:nixos/nixpkgs/nixos-22.05"; + nixpkgs-head.url = "github:nixos/nixpkgs/master"; + nix-darwin.url = "github:lnl7/nix-darwin/master"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/overlays/default.nix b/overlays/default.nix index 6b81e38..e5740b1 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -14,6 +14,21 @@ in { element-themes = prev.callPackage ./pkgs/element-themes { inherit (inputs) element-themes; }; + mastodon = prev.mastodon.override { + version = "4.2.7"; + patches = [ + (final.fetchpatch { + url = "https://github.com/mastodon/mastodon/compare/v4.2.6...v4.2.7.patch"; + hash = "sha256-8FhlSIHOKIEjq62+rp8QdHY87qMCtDZwjyR0HabdHig="; + }) + ]; + + # Mastodon has been upgraded on master, the backport is still + # in progress. This is a temporary hack until the backport + # makes it to 23.11. + # https://github.com/NixOS/nixpkgs/pull/289261 + gemset = import "${inputs.nixpkgs-head.sourceInfo.outPath}/pkgs/servers/mastodon/gemset.nix"; + }; }) ]; }); -- 2.44.2