2021-12-30 13:39:12 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromSourcehut
|
|
|
|
, buildGoModule
|
2022-06-16 17:23:12 +00:00
|
|
|
, unzip
|
2021-12-30 13:39:12 +00:00
|
|
|
}:
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
buildGoModule (rec {
|
2021-12-30 13:39:12 +00:00
|
|
|
pname = "pagessrht";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "0.7.4";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~sircmpwn";
|
|
|
|
repo = "pages.sr.ht";
|
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-WM9T2LS8yIqaR0PQQRgMk/tiMYcw8DZVPMqMWkj/5RY=";
|
2021-12-30 13:39:12 +00:00
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "all: server" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
vendorSha256 = "sha256-VOqY/nStqGyfWOXnJSZX8UYyp2kzcibQM2NRNysHYEc=";
|
2021-12-30 13:39:12 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/sql/
|
|
|
|
cp -r -t $out/share/sql/ schema.sql migrations
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/pages.sr.ht";
|
|
|
|
description = "Web hosting service for the sr.ht network";
|
|
|
|
license = licenses.agpl3Only;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
2022-06-16 17:23:12 +00:00
|
|
|
# There is no ./loaders but this does not cause troubles
|
|
|
|
# to go generate
|
|
|
|
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion= "0.17.9"; })
|