From 8f92ed46cf7262156ab08d86145529c95f73ed3a Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Thu, 2 Jun 2022 13:44:52 +0200 Subject: sourcehut: code-style formatting --- pkgs/applications/version-management/sourcehut/builds.nix | 2 +- .../version-management/sourcehut/fix-gqlgen-trimpath.nix | 6 +----- pkgs/applications/version-management/sourcehut/git.nix | 2 +- pkgs/applications/version-management/sourcehut/hg.nix | 3 ++- pkgs/applications/version-management/sourcehut/lists.nix | 2 +- pkgs/applications/version-management/sourcehut/meta.nix | 2 +- pkgs/applications/version-management/sourcehut/pages.nix | 2 +- 7 files changed, 8 insertions(+), 11 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 99d6a05c4eb72..f951af1763a28 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -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; diff --git a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix index 1f94913292e03..1a45c8112ba8d 100644 --- a/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix +++ b/pkgs/applications/version-management/sourcehut/fix-gqlgen-trimpath.nix @@ -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 ''; } diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index a721da0ecd366..d25443554b205 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -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; diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index 60f3f3d4aee3d..f4e61d11959aa 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -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; diff --git a/pkgs/applications/version-management/sourcehut/lists.nix b/pkgs/applications/version-management/sourcehut/lists.nix index b9a00ffd21399..4d5b514f651c3 100644 --- a/pkgs/applications/version-management/sourcehut/lists.nix +++ b/pkgs/applications/version-management/sourcehut/lists.nix @@ -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 \ diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index 896279addd3d4..cac0134425863 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -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 { diff --git a/pkgs/applications/version-management/sourcehut/pages.nix b/pkgs/applications/version-management/sourcehut/pages.nix index faa6dbb4d49db..7569744e9c7df 100644 --- a/pkgs/applications/version-management/sourcehut/pages.nix +++ b/pkgs/applications/version-management/sourcehut/pages.nix @@ -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; }) -- cgit 1.4.1