patch matrix-media-repo for arm64

This commit is contained in:
Charlotte 🦝 Delenk 2022-07-19 20:56:40 +01:00
parent 6677d19ea9
commit 440b692cea
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
4 changed files with 82 additions and 15 deletions

View file

@ -6,9 +6,6 @@ in {
pname = "matrix-media-repo"; pname = "matrix-media-repo";
version = inputs.matrix-media-repo.lastModifiedDate; version = inputs.matrix-media-repo.lastModifiedDate;
src = pkgs.callPackage ./source.nix {}; src = pkgs.callPackage ./source.nix {};
patches = [
./async-media.patch
];
go = pkgs.go_1_16; go = pkgs.go_1_16;
proxyVendor = true; proxyVendor = true;
modules = ./gomod2nix.toml; modules = ./gomod2nix.toml;

View file

@ -1,7 +1,16 @@
{fetchgit}: {
fetchgit { applyPatches,
url = "https://github.com/turt2live/matrix-media-repo"; fetchgit,
rev = "3184dbc7720fc103aaf4704be894eac69535e887"; }:
sha256 = "1c1a9hbmq3zjrxfi84i3lwwjld0sn38f8rxwnvsbf8k6ii3jp6d6"; applyPatches {
leaveDotGit = true; src = fetchgit {
url = "https://github.com/turt2live/matrix-media-repo";
rev = "3184dbc7720fc103aaf4704be894eac69535e887";
sha256 = "1c1a9hbmq3zjrxfi84i3lwwjld0sn38f8rxwnvsbf8k6ii3jp6d6";
leaveDotGit = true;
};
patches = [
./async-media.patch
./support-aarch64.patch
];
} }

View file

@ -0,0 +1,55 @@
diff --git a/go.mod b/go.mod
index fc0d45e..568f427 100644
--- a/go.mod
+++ b/go.mod
@@ -6,6 +6,7 @@ require (
github.com/DavidHuie/gomigrate v0.0.0-20190826182718-4adc4b3de142
github.com/Jeffail/tunny v0.0.0-20210126202424-1b37d6cb867a
github.com/PuerkitoBio/goquery v1.6.1
+ github.com/adrium/goheif v0.0.0-20210309200126-b184a7b446fa // indirect
github.com/ajstarks/svgo v0.0.0-20200725142600-7a3c8b57fecb // indirect
github.com/alioygur/is v1.0.3
github.com/andybalholm/cascadia v1.2.0 // indirect
@@ -44,7 +45,6 @@ require (
github.com/ipfs/go-ipfs-config v0.12.0
github.com/ipfs/go-ipfs-files v0.0.8
github.com/ipfs/interface-go-ipfs-core v0.4.0
- github.com/jdeng/goheif v0.0.0-20200323230657-a0d6a8b3e68f
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 // indirect
github.com/k3a/html2text v1.0.7
github.com/kettek/apng v0.0.0-20191108220231-414630eed80f
diff --git a/go.sum b/go.sum
index 1f9d94b..75fbdfe 100644
--- a/go.sum
+++ b/go.sum
@@ -53,6 +53,8 @@ github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMx
github.com/Stebalien/go-bitfield v0.0.1 h1:X3kbSSPUaJK60wV2hjOPZwmpljr6VGCqdq4cBLhbQBo=
github.com/Stebalien/go-bitfield v0.0.1/go.mod h1:GNjFpasyUVkHMsfEOk8EFLJ9syQ6SI+XWrX9Wf2XH0s=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
+github.com/adrium/goheif v0.0.0-20210309200126-b184a7b446fa h1:ISwtQHwIaKiwhFFmBOIib1o1jH3UvtKPnsEo45zsVj0=
+github.com/adrium/goheif v0.0.0-20210309200126-b184a7b446fa/go.mod h1:aKVJoQ0cc9K5Xb058XSnnAxXLliR97qbSqWBlm5ca1E=
github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
@@ -675,8 +677,6 @@ github.com/jbenet/goprocess v0.1.3 h1:YKyIEECS/XvcfHtBzxtjBBbWK+MbvA6dG8ASiqwvr1
github.com/jbenet/goprocess v0.1.3/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
github.com/jbenet/goprocess v0.1.4 h1:DRGOFReOMqqDNXwW70QkacFW0YN9QnwLV0Vqk+3oU0o=
github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZlqdZVfqY4=
-github.com/jdeng/goheif v0.0.0-20200323230657-a0d6a8b3e68f h1:jYkcRYsnnvPF07yn4XJx3k8duM4KDw3QYB3p8bUrk80=
-github.com/jdeng/goheif v0.0.0-20200323230657-a0d6a8b3e68f/go.mod h1:G7IyA3/eR9IFmUIPdyP3c0l4ZaqEvXAk876WfaQ8plc=
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869 h1:IPJ3dvxmJ4uczJe5YQdrYB16oTJlGSC/OyZDqUk9xX4=
github.com/jehiah/go-strftime v0.0.0-20171201141054-1d33003b3869/go.mod h1:cJ6Cj7dQo+O6GJNiMx+Pa94qKj+TG8ONdKHgMNIyyag=
github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
diff --git a/thumbnailing/i/heif.go b/thumbnailing/i/heif.go
index 66da380..e05e498 100644
--- a/thumbnailing/i/heif.go
+++ b/thumbnailing/i/heif.go
@@ -3,7 +3,7 @@ package i
import (
"bytes"
"errors"
- "github.com/jdeng/goheif"
+ "github.com/adrium/goheif"
"github.com/turt2live/matrix-media-repo/common/rcontext"
"github.com/turt2live/matrix-media-repo/thumbnailing/m"
)

View file

@ -19,12 +19,18 @@ SHA=$(echo $JSON | jq -r .sha256)
SOURCE_DIR=$(grep '^path is' $WORK_DIR/nix-prefetch-git.out | sed 's/^path is //') SOURCE_DIR=$(grep '^path is' $WORK_DIR/nix-prefetch-git.out | sed 's/^path is //')
cat > source.nix << EOF cat > source.nix << EOF
{fetchgit}: {applyPatches, fetchgit}:
fetchgit { applyPatches {
url = "$URL"; src = fetchgit {
rev = "$REVISION"; url = "$URL";
sha256 = "$SHA"; rev = "$REVISION";
leaveDotGit = true; sha256 = "$SHA";
leaveDotGit = true;
};
patches = [
./async-media.patch
./support-aarch64.patch
];
} }
EOF EOF