46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
# SPDX-FileCopyrightText: 2020 Luke Granger-Brown <depot@lukegb.com>
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{ pkgs, depot, ... }:
|
|
let
|
|
version = "heptapod-0.7.0";
|
|
newSrc = pkgs.fetchFromGitLab {
|
|
domain = "foss.heptapod.net";
|
|
owner = "heptapod";
|
|
repo = "heptapod-runner";
|
|
rev = version;
|
|
hash = "sha256-2lKBu8dEC8BAS760MEY7JtyUsRjajHfnldEObe2Yc94=";
|
|
};
|
|
in
|
|
rec {
|
|
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-hgrc = pkgs.runCommand "heptapod-runner-mercurial-hgrc" {} ''
|
|
cp ${newSrc}/dockerfiles/runner-helper/runner.hgrc $out
|
|
'';
|
|
heptapod-runner-mercurial = pkgs.symlinkJoin {
|
|
name = pkgs.mercurial.name;
|
|
paths = [ pkgs.mercurial ];
|
|
postBuild = ''
|
|
mkdir -p "$out/etc/mercurial"
|
|
cp "${heptapod-runner-hgrc}" "$out/etc/mercurial/hgrc"
|
|
'';
|
|
};
|
|
}
|