aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/default.nix21
-rw-r--r--infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/static-root-path.patch13
2 files changed, 8 insertions, 26 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/default.nix
index 48667ad8be39..b574c03248f1 100644
--- a/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildGoPackage, fetchFromGitHub, makeWrapper
+{ stdenv, buildGoModule, fetchFromGitHub, makeWrapper
, git, bash, gzip, openssh, pam
, sqliteSupport ? true
, pamSupport ? true
@@ -6,25 +6,26 @@
with stdenv.lib;
-buildGoPackage rec {
+buildGoModule rec {
pname = "gogs";
- version = "0.11.91";
+ version = "0.12.3";
src = fetchFromGitHub {
owner = "gogs";
repo = "gogs";
rev = "v${version}";
- sha256 = "1yfimgjg9n773kdml17119539w9736mi66bivpv5yp3cj2hj9mlj";
+ sha256 = "0ix3mxy8cpqbx24qffbzyf5z88x7605icm7rk5n54r8bdsr7cckd";
};
- patches = [ ./static-root-path.patch ];
+ vendorSha256 = "0m0g4dsiq8p2ngsbjxfi3wff7x4xpm67qlhgcgf8b48mqai4d2gc";
+
+ subPackages = [ "." ];
postPatch = ''
patchShebangs .
- substituteInPlace pkg/setting/setting.go --subst-var data
'';
- nativeBuildInputs = [ makeWrapper ];
+ nativeBuildInputs = [ makeWrapper openssh ];
buildInputs = optional pamSupport pam;
@@ -34,18 +35,12 @@ buildGoPackage rec {
( optional sqliteSupport "sqlite"
++ optional pamSupport "pam");
- outputs = [ "out" "data" ];
-
postInstall = ''
- mkdir $data
- cp -R $src/{public,templates} $data
wrapProgram $out/bin/gogs \
--prefix PATH : ${makeBinPath [ bash git gzip openssh ]}
'';
- goPackagePath = "github.com/gogs/gogs";
-
meta = {
description = "A painless self-hosted Git service";
homepage = "https://gogs.io";
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/static-root-path.patch b/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/static-root-path.patch
deleted file mode 100644
index 9eaa72a0c85d..000000000000
--- a/infra/libkookie/nixpkgs/pkgs/applications/version-management/gogs/static-root-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go
-index f206592d..796da6ef 100644
---- a/pkg/setting/setting.go
-+++ b/pkg/setting/setting.go
-@@ -474,7 +474,7 @@ func NewContext() {
- LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HTTPPort + "/")
- OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
- DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
-- StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir)
-+ StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString("@data@")
- AppDataPath = sec.Key("APP_DATA_PATH").MustString("data")
- EnableGzip = sec.Key("ENABLE_GZIP").MustBool()
-