omnom: init at 0-unstable-2024-08-29 (#339846)
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
Bump the minimal Go version as some features require Go 1.17 and higher to work
|
||||
|
||||
---
|
||||
go.mod | 48 ++++++++++++++++++++++++++++++++++++++----------
|
||||
1 file changed, 38 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 1756ffe..81f7fa2 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -1,31 +1,59 @@
|
||||
module github.com/asciimoo/omnom
|
||||
|
||||
-go 1.15
|
||||
+go 1.17
|
||||
|
||||
require (
|
||||
- github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff // indirect
|
||||
- github.com/bytedance/sonic v1.12.1 // indirect
|
||||
- github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||
github.com/gin-contrib/multitemplate v1.0.1
|
||||
github.com/gin-gonic/contrib v0.0.0-20240508051311-c1c6bf0061b0
|
||||
github.com/gin-gonic/gin v1.10.0
|
||||
+ github.com/spf13/cobra v1.8.1
|
||||
+ github.com/xhit/go-simple-mail/v2 v2.16.0
|
||||
+ golang.org/x/net v0.27.0
|
||||
+ gopkg.in/yaml.v2 v2.4.0
|
||||
+ gorm.io/driver/sqlite v1.5.6
|
||||
+ gorm.io/gorm v1.25.11
|
||||
+)
|
||||
+
|
||||
+require (
|
||||
+ github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff // indirect
|
||||
+ github.com/bytedance/sonic v1.12.1 // indirect
|
||||
+ github.com/bytedance/sonic/loader v0.2.0 // indirect
|
||||
+ github.com/cloudwego/base64x v0.1.4 // indirect
|
||||
+ github.com/cloudwego/iasm v0.2.0 // indirect
|
||||
+ github.com/gabriel-vasile/mimetype v1.4.5 // indirect
|
||||
+ github.com/gin-contrib/sse v0.1.0 // indirect
|
||||
+ github.com/go-playground/locales v0.14.1 // indirect
|
||||
+ github.com/go-playground/universal-translator v0.18.1 // indirect
|
||||
github.com/go-playground/validator/v10 v10.22.0 // indirect
|
||||
github.com/go-test/deep v1.1.1 // indirect
|
||||
github.com/goccy/go-json v0.10.3 // indirect
|
||||
+ github.com/gomodule/redigo v2.0.0+incompatible // indirect
|
||||
+ github.com/google/go-cmp v0.6.0 // indirect
|
||||
github.com/gorilla/context v1.1.2 // indirect
|
||||
+ github.com/gorilla/securecookie v1.1.2 // indirect
|
||||
github.com/gorilla/sessions v1.3.0 // indirect
|
||||
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
+ github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
+ github.com/jinzhu/now v1.1.5 // indirect
|
||||
+ github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
|
||||
github.com/kr/pretty v0.3.0 // indirect
|
||||
+ github.com/leodido/go-urn v1.4.0 // indirect
|
||||
+ github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
+ github.com/mattn/go-sqlite3 v1.14.22 // indirect
|
||||
+ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
+ github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||
+ github.com/pelletier/go-toml/v2 v2.2.2 // indirect
|
||||
github.com/rogpeppe/go-internal v1.8.0 // indirect
|
||||
- github.com/spf13/cobra v1.8.1
|
||||
+ github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/toorop/go-dkim v0.0.0-20240103092955-90b7d1423f92 // indirect
|
||||
- github.com/xhit/go-simple-mail/v2 v2.16.0
|
||||
+ github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
||||
+ github.com/ugorji/go/codec v1.2.12 // indirect
|
||||
golang.org/x/arch v0.9.0 // indirect
|
||||
- golang.org/x/net v0.27.0
|
||||
+ golang.org/x/crypto v0.25.0 // indirect
|
||||
golang.org/x/sys v0.23.0 // indirect
|
||||
+ golang.org/x/text v0.16.0 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
- gopkg.in/yaml.v2 v2.4.0
|
||||
- gorm.io/driver/sqlite v1.5.6
|
||||
- gorm.io/gorm v1.25.11
|
||||
+ gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
)
|
||||
--
|
||||
2.45.2
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
buildGoModule {
|
||||
pname = "omnom";
|
||||
version = "0-unstable-2024-08-29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asciimoo";
|
||||
repo = "omnom";
|
||||
rev = "1fcd7787886503f703bbcd31b193d4c93acc5610";
|
||||
hash = "sha256-o/n8rgngQkYEn8J0aFpCiD4qrWVFaaa305OxiscU6+8=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
vendorHash = "sha256-dsS5w8JXIwkneWScOFzLSDiXq+clgK+RdYiMw0+FnvY=";
|
||||
|
||||
patches = [ ./0001-fix-minimal-go-version.patch ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
ldflags = [
|
||||
"-s"
|
||||
"-w"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# For the default config to work, we have to put `static/data` and
|
||||
# `db.sqlite3` in a temporary directory since they need to be writeable.
|
||||
#
|
||||
# NOTE: Currently, `static/data` only holds the snapshots directory.
|
||||
substituteInPlace config.yml \
|
||||
--replace-fail 'root: "./static/data"' 'root: "/tmp/omnom/static/data"' \
|
||||
--replace-fail 'connection: "./db.sqlite3"' 'connection: "/tmp/omnom/db.sqlite3"' \
|
||||
--replace-fail 'debug: true' 'debug: false'
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share
|
||||
cp -r config.yml static templates $out/share
|
||||
|
||||
wrapProgram $out/bin/omnom \
|
||||
--chdir $out/share \
|
||||
--set-default GIN_MODE release
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A webpage bookmarking and snapshotting service";
|
||||
homepage = "https://github.com/asciimoo/omnom";
|
||||
license = lib.licenses.agpl3Only;
|
||||
maintainers = [
|
||||
# maintained by the team working on NGI-supported software, no group for this yet
|
||||
];
|
||||
mainProgram = "omnom";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user