sourcehut: code-style formatting
This commit is contained in:
parent
f34d654860
commit
8f92ed46cf
@ -26,7 +26,7 @@ let
|
||||
pname = "buildsrht-api";
|
||||
modRoot = "api";
|
||||
vendorSha256 = "sha256-roTwqtg4Y846PNtLdRN/LV3Jd0LVElqjFy3DJcrwoaI=";
|
||||
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
|
||||
|
||||
buildsrht-worker = buildGoModule {
|
||||
inherit src version;
|
||||
|
@ -4,14 +4,12 @@
|
||||
# No need to workaround -trimpath: it's not used in go-modules,
|
||||
# but do download `go generate`'s dependencies nonetheless.
|
||||
preBuild = ''
|
||||
set -x
|
||||
go generate ./loaders
|
||||
go generate ./graph
|
||||
set +x
|
||||
'';
|
||||
});
|
||||
|
||||
# Workaround:
|
||||
# Workaround this error:
|
||||
# go: git.sr.ht/~emersion/go-emailthreads@v0.0.0-20220412093310-4fd792e343ba: module lookup disabled by GOPROXY=off
|
||||
# tidy failed: go mod tidy failed: exit status 1
|
||||
# graph/generate.go:10: running "go": exit status 1
|
||||
@ -22,11 +20,9 @@
|
||||
# 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 ''
|
||||
set -x
|
||||
${unzip}/bin/unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip
|
||||
go generate ./loaders
|
||||
go generate ./graph
|
||||
rm -rf github.com
|
||||
set +x
|
||||
'';
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ let
|
||||
pname = "gitsrht-api";
|
||||
modRoot = "api";
|
||||
vendorSha256 = "sha256-0YI20liP0X1McfiSUy29zJk2UqqAPBIfIfPLoJOE1uI=";
|
||||
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
|
||||
|
||||
gitDispatch = buildGoModule {
|
||||
inherit src version;
|
||||
|
@ -21,6 +21,7 @@ buildPythonPackage rec {
|
||||
sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI=";
|
||||
vc = "hg";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "all: api hgsrht-keys" ""
|
||||
@ -31,7 +32,7 @@ buildPythonPackage rec {
|
||||
pname = "hgsrht-api";
|
||||
modRoot = "api";
|
||||
vendorSha256 = "sha256-W7A22qSIgJgcfS7xYNrmbYKaZBXbDtPilM9I6DxmTeU=";
|
||||
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
|
||||
|
||||
hgsrht-keys = buildGoModule {
|
||||
inherit src version;
|
||||
|
@ -28,7 +28,7 @@ buildPythonPackage rec {
|
||||
pname = "listssrht-api";
|
||||
modRoot = "api";
|
||||
vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0=";
|
||||
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||
} // import ./fix-gqlgen-trimpath.nix { inherit unzip;});
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
pname = "metasrht-api";
|
||||
modRoot = "api";
|
||||
vendorSha256 = "sha256-3s9PYUy4qS06zyTIRDvnAmhfrjVLBa/03Nu3tMcIReI=";
|
||||
} // import ./fix-gqlgen-trimpath.nix {inherit unzip;});
|
||||
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
|
||||
|
||||
in
|
||||
buildPythonPackage rec {
|
||||
|
@ -30,4 +30,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; })
|
||||
|
Loading…
Reference in New Issue
Block a user