From e8b2667c013d71df91ce1d3c95988b333a7a60e2 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Fri, 11 Mar 2022 15:15:30 +0000 Subject: [PATCH] heptapod-runner: make a separate drv and stop maintaining it as a patchset on top of gitlab-runner --- nix/pkgs/heptapod-runner/default.nix | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/nix/pkgs/heptapod-runner/default.nix b/nix/pkgs/heptapod-runner/default.nix index 6196cd40ec..5c1fa858f5 100644 --- a/nix/pkgs/heptapod-runner/default.nix +++ b/nix/pkgs/heptapod-runner/default.nix @@ -4,20 +4,32 @@ { pkgs, depot, ... }: let - version = "hpd-0.4.0"; + version = "hpd-0.5.0"; newSrc = pkgs.fetchhg { url = "https://mirror.octobus.net/heptapod/heptapod-runner"; - rev = "8b729b09e365"; - sha256 = "1769kcpgmhnibdmhvsdnylsdk8w08c7mgxi23vrx7vjfxgij1bdr"; + rev = "5843be69a387"; + sha256 = "sha256:15iyz7rgi6rb4nf1rjd96lsgdxn2l1ivzh05my7c9zpzvl7cnw25"; }; in { - heptapod-runner = pkgs.gitlab-runner.overrideAttrs (oldAttrs: rec { + heptapod-runner = pkgs.buildGoModule rec { + pname = "heptapod-runner"; inherit version; - buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.makeWrapper ]; + + commonPackagePath = "gitlab.com/gitlab-org/gitlab-runner/common"; + ldflags = [ + "-X ${commonPackagePath}.NAME=heptapod-runner" + "-X ${commonPackagePath}.VERSION=${version}" + "-X ${commonPackagePath}.REVISION=v${version}" + ]; + src = newSrc; + vendorSha256 = null; + patches = [ ./fix-shell-path.patch ]; - }); + + doCheck = false; + }; heptapod-runner-mercurial = pkgs.symlinkJoin { name = pkgs.mercurial.name; paths = [ pkgs.mercurial ];