Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

gogs: 0.11.91 -> 0.12.3

+8 -34
-8
nixos/modules/services/misc/gogs.nix
··· 25 25 HTTP_ADDR = ${cfg.httpAddress} 26 26 HTTP_PORT = ${toString cfg.httpPort} 27 27 ROOT_URL = ${cfg.rootUrl} 28 - STATIC_ROOT_PATH = ${cfg.staticRootPath} 29 28 30 29 [session] 31 30 COOKIE_NAME = session ··· 177 176 Marks session cookies as "secure" as a hint for browsers to only send 178 177 them via HTTPS. This option is recommend, if Gogs is being served over HTTPS. 179 178 ''; 180 - }; 181 - 182 - staticRootPath = mkOption { 183 - type = types.str; 184 - default = "${pkgs.gogs.data}"; 185 - example = "/var/lib/gogs/data"; 186 - description = "Upper level of template and static files path."; 187 179 }; 188 180 189 181 extraConfig = mkOption {
+8 -13
pkgs/applications/version-management/gogs/default.nix
··· 1 - { stdenv, buildGoPackage, fetchFromGitHub, makeWrapper 1 + { stdenv, buildGoModule, fetchFromGitHub, makeWrapper 2 2 , git, bash, gzip, openssh, pam 3 3 , sqliteSupport ? true 4 4 , pamSupport ? true ··· 6 6 7 7 with stdenv.lib; 8 8 9 - buildGoPackage rec { 9 + buildGoModule rec { 10 10 pname = "gogs"; 11 - version = "0.11.91"; 11 + version = "0.12.3"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "gogs"; 15 15 repo = "gogs"; 16 16 rev = "v${version}"; 17 - sha256 = "1yfimgjg9n773kdml17119539w9736mi66bivpv5yp3cj2hj9mlj"; 17 + sha256 = "0ix3mxy8cpqbx24qffbzyf5z88x7605icm7rk5n54r8bdsr7cckd"; 18 18 }; 19 19 20 - patches = [ ./static-root-path.patch ]; 20 + vendorSha256 = "0m0g4dsiq8p2ngsbjxfi3wff7x4xpm67qlhgcgf8b48mqai4d2gc"; 21 + 22 + subPackages = [ "." ]; 21 23 22 24 postPatch = '' 23 25 patchShebangs . 24 - substituteInPlace pkg/setting/setting.go --subst-var data 25 26 ''; 26 27 27 - nativeBuildInputs = [ makeWrapper ]; 28 + nativeBuildInputs = [ makeWrapper openssh ]; 28 29 29 30 buildInputs = optional pamSupport pam; 30 31 ··· 34 35 ( optional sqliteSupport "sqlite" 35 36 ++ optional pamSupport "pam"); 36 37 37 - outputs = [ "out" "data" ]; 38 - 39 38 postInstall = '' 40 - mkdir $data 41 - cp -R $src/{public,templates} $data 42 39 43 40 wrapProgram $out/bin/gogs \ 44 41 --prefix PATH : ${makeBinPath [ bash git gzip openssh ]} 45 42 ''; 46 - 47 - goPackagePath = "github.com/gogs/gogs"; 48 43 49 44 meta = { 50 45 description = "A painless self-hosted Git service";
-13
pkgs/applications/version-management/gogs/static-root-path.patch
··· 1 - diff --git a/pkg/setting/setting.go b/pkg/setting/setting.go 2 - index f206592d..796da6ef 100644 3 - --- a/pkg/setting/setting.go 4 - +++ b/pkg/setting/setting.go 5 - @@ -474,7 +474,7 @@ func NewContext() { 6 - LocalURL = sec.Key("LOCAL_ROOT_URL").MustString(string(Protocol) + "://localhost:" + HTTPPort + "/") 7 - OfflineMode = sec.Key("OFFLINE_MODE").MustBool() 8 - DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() 9 - - StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString(workDir) 10 - + StaticRootPath = sec.Key("STATIC_ROOT_PATH").MustString("@data@") 11 - AppDataPath = sec.Key("APP_DATA_PATH").MustString("data") 12 - EnableGzip = sec.Key("ENABLE_GZIP").MustBool() 13 -