forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / applications / version-management / sourcehut / pages.nix
blob5fc140548dc7ad11c04cf8b9fd08743a290da3c1
1 { lib
2 , fetchFromSourcehut
3 , buildGoModule
4 , unzip
5 }:
7 buildGoModule (rec {
8   pname = "pagessrht";
9   version = "0.15.7";
11   src = fetchFromSourcehut {
12     owner = "~sircmpwn";
13     repo = "pages.sr.ht";
14     rev = version;
15     hash = "sha256-Lobuf12ybSO7Y4ztOLMFW0dmPFaBSEPCy4Nmh89tylI=";
16   };
18   postPatch = ''
19     substituteInPlace Makefile \
20       --replace "all: server" ""
22     # fix build failure due to unused import
23     substituteInPlace server.go \
24       --replace-warn '  "fmt"' ""
25   '';
27   vendorHash = "sha256-9hpOkP6AYSZe7MW1mrwFEKq7TvVt6OcF6eHWY4jARuU=";
29   postInstall = ''
30     mkdir -p $out/share/sql/
31     cp -r -t $out/share/sql/ schema.sql migrations
32   '';
34   meta = with lib; {
35     homepage = "https://git.sr.ht/~sircmpwn/pages.sr.ht";
36     description = "Web hosting service for the sr.ht network";
37     mainProgram = "pages.sr.ht";
38     license = licenses.agpl3Only;
39     maintainers = with maintainers; [ eadwu christoph-heiss ];
40   };
41   # There is no ./loaders but this does not cause troubles
42   # to go generate
43 } // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion = "0.17.42"; })