2020-06-07 14:03:12 +00:00
|
|
|
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2021-12-20 02:47:45 +00:00
|
|
|
{ pkgs, depot, ... }:
|
2020-05-09 00:10:49 +00:00
|
|
|
let
|
2021-12-20 02:47:45 +00:00
|
|
|
version = "hpd-0.4.0";
|
2020-05-09 00:10:49 +00:00
|
|
|
newSrc = pkgs.fetchhg {
|
|
|
|
url = "https://mirror.octobus.net/heptapod/heptapod-runner";
|
2021-12-20 02:47:45 +00:00
|
|
|
rev = "8b729b09e365";
|
|
|
|
sha256 = "1769kcpgmhnibdmhvsdnylsdk8w08c7mgxi23vrx7vjfxgij1bdr";
|
2020-05-09 00:10:49 +00:00
|
|
|
};
|
2020-05-09 22:49:32 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
heptapod-runner = pkgs.gitlab-runner.overrideAttrs (oldAttrs: rec {
|
|
|
|
inherit version;
|
2022-03-11 14:56:55 +00:00
|
|
|
buildInputs = (oldAttrs.buildInputs or []) ++ [ pkgs.makeWrapper ];
|
2020-05-09 22:49:32 +00:00
|
|
|
src = newSrc;
|
2021-12-25 20:31:34 +00:00
|
|
|
patches = [ ./fix-shell-path.patch ];
|
2020-05-09 22:49:32 +00:00
|
|
|
});
|
|
|
|
heptapod-runner-mercurial = pkgs.symlinkJoin {
|
2020-05-09 12:22:49 +00:00
|
|
|
name = pkgs.mercurial.name;
|
|
|
|
paths = [ pkgs.mercurial ];
|
|
|
|
postBuild = ''
|
|
|
|
mkdir -p "$out/etc/mercurial"
|
2021-12-20 05:56:24 +00:00
|
|
|
cp "${newSrc}/dockerfiles/runner-helper/runner.hgrc" "$out/etc/mercurial/hgrc"
|
2020-05-09 12:22:49 +00:00
|
|
|
'';
|
|
|
|
};
|
2020-05-09 22:49:32 +00:00
|
|
|
}
|