From 2524e0d7f37bee8efb8359080e60a961503cbfa0 Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 14:48:35 +0200 Subject: [PATCH] sourcehut.pagessrht: 0.7.3 -> 0.7.4 --- .../sourcehut/fix-gqlgen-trimpath.nix | 6 ++++-- .../version-management/sourcehut/pages.nix | 13 +++++++++---- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index a95c3a3f3fd2..629d767a1caf 100644 --- a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -1,4 +1,6 @@ -{ unzip }: +{ unzip +, gqlgenVersion ? "0.17.2" +}: { overrideModAttrs = (_: { # No need to workaround -trimpath: it's not used in go-modules, @@ -21,7 +23,7 @@ # https://github.com/99designs/gqlgen/issues/1537 # This is to give `go generate ./graph` access to gqlgen's *.gotpl files # If it fails, the gqlgenVersion may have to be updated. - preBuild = let gqlgenVersion = "0.17.2"; in '' + preBuild = '' unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip go generate ./loaders go generate ./graph diff --git a/pkgs/applications/version-management/sourcehut/pages.nix b/pkgs/applications/version-management/sourcehut/pages.nix index 7569744e9c7d..edb9379c6ded 100644 --- a/pkgs/applications/version-management/sourcehut/pages.nix +++ b/pkgs/applications/version-management/sourcehut/pages.nix @@ -6,16 +6,21 @@ buildGoModule (rec { pname = "pagessrht"; - version = "0.7.3"; + version = "0.7.4"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "pages.sr.ht"; rev = version; - sha256 = "sha256-fHhf4VQ82/k4g8pzyuN9Pr2f8mxT8zw+2Nq0nw1Msks="; + sha256 = "sha256-WM9T2LS8yIqaR0PQQRgMk/tiMYcw8DZVPMqMWkj/5RY="; }; - vendorSha256 = "sha256-/+XVl6PZUMOZIiuO6vEu0dacefz2hDSObaP8JsItSTw="; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: server" "" + ''; + + vendorSha256 = "sha256-VOqY/nStqGyfWOXnJSZX8UYyp2kzcibQM2NRNysHYEc="; postInstall = '' mkdir -p $out/share/sql/ @@ -30,4 +35,4 @@ buildGoModule (rec { }; # There is no ./loaders but this does not cause troubles # to go generate -} // import ./fix-gqlgen-trimpath.nix { inherit unzip; }) +} // import ./fix-gqlgen-trimpath.nix { inherit unzip; gqlgenVersion= "0.17.9"; })