diff --git a/pkgs/by-name/gi/gitea/package.nix b/pkgs/by-name/gi/gitea/package.nix index 37ece7f0cf99..3634b94d7875 100644 --- a/pkgs/by-name/gi/gitea/package.nix +++ b/pkgs/by-name/gi/gitea/package.nix @@ -9,44 +9,54 @@ compressDrvWeb, gitea, gzip, + nodejs, openssh, + pnpm, + stdenv, sqliteSupport ? true, nixosTests, - buildNpmPackage, }: let - frontend = buildNpmPackage { + frontend = stdenv.mkDerivation (finalAttrs: { pname = "gitea-frontend"; inherit (gitea) src version; - npmDepsHash = "sha256-86SIiBamHdilEWbwBk6usVU/tzdYTT3Zvph3w/ZVjTs="; + pnpmDeps = pnpm.fetchDeps { + inherit (finalAttrs) pname version src; + fetcherVersion = 2; + hash = "sha256-0p7P68BvO3hv0utUbnPpHSpGLlV7F9HHmOITvJAb/ww="; + }; + + nativeBuildInputs = [ + nodejs + pnpm.configHook + ]; - # use webpack directly instead of 'make frontend' as the packages are already installed buildPhase = '' - BROWSERSLIST_IGNORE_OLD_DATA=true npx webpack + make frontend ''; installPhase = '' mkdir -p $out cp -R public $out/ ''; - }; + }); in buildGoModule rec { pname = "gitea"; - version = "1.24.7"; + version = "1.25.0"; src = fetchFromGitHub { owner = "go-gitea"; repo = "gitea"; tag = "v${gitea.version}"; - hash = "sha256-0UOzEVy7SqYVnH3dJCzS9/jvRg7F/uqjZgQvUhh7RoE="; + hash = "sha256-uBBL62Q/aigsCo0S0hwNooKljTn+OfcqoJxan6Ac0rM="; }; proxyVendor = true; - vendorHash = "sha256-t9KeK1S16xaPxfg+LYRp6/PuuxeEOgRF4GEvgKusDiI="; + vendorHash = "sha256-HHW7xgXJKnzj6HLKAUXKYIZgOKKbXVSK+YGSKCwBeLU="; outputs = [ "out" diff --git a/pkgs/by-name/gi/gitea/static-root-path.patch b/pkgs/by-name/gi/gitea/static-root-path.patch index 7f70329c6040..db2857cfe5ea 100644 --- a/pkgs/by-name/gi/gitea/static-root-path.patch +++ b/pkgs/by-name/gi/gitea/static-root-path.patch @@ -1,10 +1,10 @@ diff --git a/modules/setting/server.go b/modules/setting/server.go -index 183906268..fa02e8915 100644 +index 38e166e02a..bbe9af4718 100644 --- a/modules/setting/server.go +++ b/modules/setting/server.go -@@ -319,7 +319,7 @@ func loadServerFrom(rootCfg ConfigProvider) { - OfflineMode = sec.Key("OFFLINE_MODE").MustBool() - Log.DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool() +@@ -351,7 +351,7 @@ func loadServerFrom(rootCfg ConfigProvider) { + RedirectorUseProxyProtocol = sec.Key("REDIRECTOR_USE_PROXY_PROTOCOL").MustBool(UseProxyProtocol) + OfflineMode = sec.Key("OFFLINE_MODE").MustBool(true) if len(StaticRootPath) == 0 { - StaticRootPath = AppWorkPath + StaticRootPath = "@data@"