···24 pname = "forgejo-frontend";
25 inherit (forgejo) src version;
2627- npmDepsHash = "sha256-uMPy4cqMDNZTpF+pk7YibXEJO1zxVfwlCeFzGgJBiU0=";
2829 patches = [
30 ./package-json-npm-build-frontend.patch
···39in
40buildGoModule rec {
41 pname = "forgejo";
42- version = "1.21.11-1";
4344 src = fetchFromGitea {
45 domain = "codeberg.org";
46 owner = "forgejo";
47 repo = "forgejo";
48 rev = "v${version}";
49- hash = "sha256-7oYsoZpZcNIUw3iXSi1Q5So2yYgKnT5U7GHQ4NVqVdc=";
50- # Forgejo has multiple different version strings that need to be provided
51- # via ldflags. main.ForgejoVersion for example is a combination of a
52- # hardcoded gitea compatibility version string (in the Makefile) and
53- # git describe and is easiest to get by invoking the Makefile.
54- # So we do that, store it the src FOD to then extend the ldflags array
55- # in preConfigure.
56- # The `echo -e >> Makefile` is temporary and already part of the next
57- # major release. Furthermore, the ldflags will change next major release
58- # and need to be updated accordingly.
59- leaveDotGit = true;
60- postFetch = ''
61- cd "$out"
62- echo -e 'show-version-full:\n\t@echo ''${FORGEJO_VERSION}' >> Makefile
63- make show-version-full > FULL_VERSION
64- find "$out" -name .git -print0 | xargs -0 rm -rf
65- '';
66 };
6768- vendorHash = "sha256-OuWNF+muWM6xqwkFxLIUsn/huqXj2VKg8BN9+JHVw58=";
6970 subPackages = [ "." ];
71···93 ];
9495 preConfigure = ''
96- export ldflags+=" -X code.gitea.io/gitea/routers/api/forgejo/v1.ForgejoVersion=$(cat FULL_VERSION) -X main.ForgejoVersion=$(cat FULL_VERSION)"
97 '';
9899 preBuild = ''