Skip to content

Commit

Permalink
allmark: fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Oct 31, 2024
1 parent 59e9936 commit bfee7dd
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 2 deletions.
92 changes: 92 additions & 0 deletions pkgs/by-name/al/allmark/0001-fix-build.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
From 59a74de57632a3b6d35218ffbfbae2734c2c8d95 Mon Sep 17 00:00:00 2001
From: wxt <[email protected]>
Date: Thu, 31 Oct 2024 23:11:11 +0800
Subject: [PATCH] fix build

---
go.mod | 21 +++++++++++++++++
go.sum | 30 ++++++++++++++++++++++++
web/orchestrator/search/fulltextindex.go | 2 +-
3 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 go.mod
create mode 100644 go.sum

diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..150de64
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,21 @@
+module github.com/andreaskoch/allmark
+go 1.19
+require (
+ github.com/abbot/go-http-auth v0.4.0
+ github.com/andreaskoch/go-fswatch v1.0.0
+ github.com/gorilla/handlers v1.5.2
+ github.com/gorilla/mux v1.8.1
+ github.com/jbarham/cdb v0.0.0-20200301055225-9d6f6caadef0
+ github.com/kyokomi/emoji v1.5.1
+ github.com/mitchellh/go-homedir v1.1.0
+ github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
+ github.com/russross/blackfriday v1.6.0
+ github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
+ github.com/spf13/afero v1.11.0
+ golang.org/x/net v0.26.0
+)
+require (
+ github.com/felixge/httpsnoop v1.0.3 // indirect
+ golang.org/x/crypto v0.24.0 // indirect
+ golang.org/x/text v0.16.0 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..bb65b70
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,30 @@
+github.com/abbot/go-http-auth v0.4.0 h1:QjmvZ5gSC7jm3Zg54DqWE/T5m1t2AfDu6QlXJT0EVT0=
+github.com/abbot/go-http-auth v0.4.0/go.mod h1:Cz6ARTIzApMJDzh5bRMSUou6UMSp0IEXg9km/ci7TJM=
+github.com/andreaskoch/go-fswatch v1.0.0 h1:la8nP/HiaFCxP2IM6NZNUCoxgLWuyNFgH0RligBbnJU=
+github.com/andreaskoch/go-fswatch v1.0.0/go.mod h1:r5/iV+4jfwoY2sYqBkg8vpF04ehOvEl4qPptVGdxmqo=
+github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
+github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
+github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE=
+github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w=
+github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
+github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
+github.com/jbarham/cdb v0.0.0-20200301055225-9d6f6caadef0 h1:UfCOnKxwt2dxueylTrrjjyMsaXPHTSJJygePRYaRntE=
+github.com/jbarham/cdb v0.0.0-20200301055225-9d6f6caadef0/go.mod h1:ColEidrii1lqlFhoEckJfZsa0mWxC0I2+f7G/5hZWsw=
+github.com/kyokomi/emoji v1.5.1 h1:qp9dub1mW7C4MlvoRENH6EAENb9skEFOvIEbp1Waj38=
+github.com/kyokomi/emoji v1.5.1/go.mod h1:mZ6aGCD7yk8j6QY6KICwnZ2pxoszVseX1DNoGtU2tBA=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
+github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
+github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
+github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
+github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
+github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 h1:JIAuq3EEf9cgbU6AtGPK4CTG3Zf6CKMNqf0MHTggAUA=
+github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
+github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
+github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY=
+golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
+golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
+golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
+golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
+golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
+golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
diff --git a/web/orchestrator/search/fulltextindex.go b/web/orchestrator/search/fulltextindex.go
index a461d66..da1b45f 100644
--- a/web/orchestrator/search/fulltextindex.go
+++ b/web/orchestrator/search/fulltextindex.go
@@ -8,7 +8,7 @@ import (
"github.com/andreaskoch/allmark/common/logger"
"github.com/andreaskoch/allmark/common/route"
"github.com/andreaskoch/allmark/model"
- "github.com/andreaskoch/fulltext"
+ "github.com/andreaskoch/allmark/common/fulltext"
"github.com/spf13/afero"
"strings"
)
--
2.46.1

21 changes: 19 additions & 2 deletions pkgs/by-name/al/allmark/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,28 @@ buildGoModule rec {
hash = "sha256-JfNn/e+cSq1pkeXs7A2dMsyhwOnh7x2bwm6dv6NOjLU=";
};

src-fulltext = fetchFromGitHub {
owner = "andreaskoch";
repo = "fulltext";
rev = "05ab8b1eab52312da647636b6889b0354f8634ad";
hash = "sha256-KpSkVuJ7gkUmrYIICbiBVFDIv83Uk1cUqF2bUh6xa98=";
};

vendorHash = "sha256-q1SeuKu2WoJlHaIwmhvmkyjnIDJF7iQur7sO9QwKMSA=";

postPatch = ''
go mod init github.com/andreaskoch/allmark
rm -rf vendor
mkdir -p common/fulltext
cp -r ${src-fulltext}/* common/fulltext
substituteInPlace common/fulltext/indexer.go \
--replace-fail "github.com/jbarham/go-cdb" "github.com/jbarham/cdb"
substituteInPlace common/fulltext/searcher.go \
--replace-fail "github.com/jbarham/go-cdb" "github.com/jbarham/cdb"
'';

vendorHash = null;
patches = [
./0001-fix-build.patch
];

postInstall = ''
mv $out/bin/{cli,allmark}
Expand Down

0 comments on commit bfee7dd

Please sign in to comment.