depot/nix/pkgs/heptapod-runner/default.nix

43 lines
1.1 KiB
Nix

# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
#
# SPDX-License-Identifier: Apache-2.0
{ pkgs, depot, ... }:
let
version = "hpd-0.6.3";
newSrc = pkgs.fetchFromGitLab {
domain = "foss.heptapod.net";
owner = "heptapod";
repo = "heptapod-runner";
rev = "15f2668f0c05cd56e0eae34f7b198a9553b7f697";
hash = "sha256-u9I7Ni4ZFI4gCROm/d41Okiu2FdiFj94KNLxHZSn7AM=";
};
in
{
heptapod-runner = pkgs.buildGoModule rec {
pname = "heptapod-runner";
inherit version;
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;
vendorHash = null;
patches = [ ./fix-shell-path.patch ];
doCheck = false;
};
heptapod-runner-mercurial = pkgs.symlinkJoin {
name = pkgs.mercurial.name;
paths = [ pkgs.mercurial ];
postBuild = ''
mkdir -p "$out/etc/mercurial"
cp "${newSrc}/dockerfiles/runner-helper/runner.hgrc" "$out/etc/mercurial/hgrc"
'';
};
}