Merge pull request #315437 from NixOS/backport-315283-to-release-24.05

[Backport release-24.05] photofield: add patch for Go 1.22 support
This commit is contained in:
Robert Scott 2024-05-28 22:26:40 +01:00 committed by GitHub
commit 8ba1269a87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,5 +1,6 @@
{ lib { lib
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, buildGoModule , buildGoModule
, buildNpmPackage , buildNpmPackage
, makeWrapper , makeWrapper
@ -10,7 +11,6 @@
}: }:
let let
pname = "photofield-ui";
version = "0.13.0"; version = "0.13.0";
src = fetchFromGitHub { src = fetchFromGitHub {
@ -35,11 +35,20 @@ let
}; };
in in
buildGoModule rec { buildGoModule {
pname = "photofield"; pname = "photofield";
inherit version src; inherit version src;
vendorHash = "sha256-4JFP3vs/Z8iSKgcwfxpdnQpO9kTF68XQArFHYP8IoDQ="; patches = [
# Needed for Go 1.22 build support
(fetchpatch {
name = "upgrade-pyroscope-go.patch";
url = "https://github.com/SmilyOrg/photofield/commit/681dcd48ab4113b0e99fe1a0d3638f0dfe985c05.patch";
hash = "sha256-JGb5KAI/SmR1kiiaPoSsAF7G4YWDFXj0K3Gjw0zA3Ro=";
})
];
vendorHash = "sha256-BnImE4wK2MDO21N5tT9Q9w+NkDpdBCEqUwzuH/xb6fg=";
preBuild = '' preBuild = ''
cp -r ${webui}/share/photofield-ui ui/dist cp -r ${webui}/share/photofield-ui ui/dist