From 43f856ab2c411ddd2aca58b84a157f807672c8ab Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Fri, 6 May 2022 00:01:39 +0200 Subject: sourcehut.buildsrht: 0.75.2 -> 0.79.1 --- .../version-management/sourcehut/builds.nix | 25 ++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 350afd07fe196..e2cc01eb9c70a 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -1,7 +1,7 @@ { lib , fetchFromSourcehut -, buildPythonPackage , buildGoModule +, buildPythonPackage , srht , redis , celery @@ -9,21 +9,29 @@ , markdown , ansi2html , python +, unzip }: let - version = "0.75.2"; + version = "0.79.1"; src = fetchFromSourcehut { owner = "~sircmpwn"; repo = "builds.sr.ht"; rev = version; - sha256 = "sha256-SwyxMzmp9baRQ0vceuEn/OpfIv7z7jwq/l67hdOHXjM="; + sha256 = "sha256-8fZ6KdD+9+n0uO3jm0AUyG08oCUNFq1K55ZOwLbkpHk="; }; - buildWorker = src: buildGoModule { + buildsrht-api = buildGoModule ({ inherit src version; - pname = "builds-sr-ht-worker"; + pname = "buildsrht-api"; + modRoot = "api"; + vendorSha256 = "sha256-roTwqtg4Y846PNtLdRN/LV3Jd0LVElqjFy3DJcrwoaI="; + } // import ./fix-gqlgen-trimpath.nix {inherit unzip;}); + buildsrht-worker = buildGoModule { + inherit src version; + sourceRoot = "source/worker"; + pname = "buildsrht-worker"; vendorSha256 = "sha256-Pf1M9a43eK4jr6QMi6kRHA8DodXQU0pqq9ua5VC3ER0="; }; in @@ -35,6 +43,10 @@ buildPythonPackage rec { # Revert change breaking Unix socket support for Redis patches/redis-socket/build/0001-Revert-Add-build-submission-and-queue-monitoring.patch ]; + postPatch = '' + substituteInPlace Makefile \ + --replace "all: api worker" "" + ''; nativeBuildInputs = srht.nativeBuildInputs; @@ -58,7 +70,8 @@ buildPythonPackage rec { cp -r images $out/lib cp contrib/submit_image_build $out/bin/builds.sr.ht - cp ${buildWorker "${src}/worker"}/bin/worker $out/bin/builds.sr.ht-worker + ln -s ${buildsrht-api}/bin/api $out/bin/buildsrht-api + ln -s ${buildsrht-worker}/bin/worker $out/bin/buildsrht-worker ''; pythonImportsCheck = [ "buildsrht" ]; -- cgit 1.4.1