This repository has been archived on 2024-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
nix-packages/ci/drone-runner-docker/default.nix

44 lines
1.4 KiB
Nix

{
fetchFromGitHub,
buildGoModule,
writeScript,
}: let
source = builtins.fromJSON (builtins.readFile ./source.json);
src = fetchFromGitHub {
owner = "drone-runners";
repo = "drone-runner-docker";
inherit (source) rev sha256;
};
in
buildGoModule rec {
pname = "drone-runner-docker";
version = source.date;
inherit src;
vendorSha256 = builtins.readFile ./goVendor.hash;
proxyVendor = true;
meta = {
description = "Docker executor for drone";
license = [
{
free = false;
fullName = "PolyForm Small Business License 1.0.0";
redistributable = true;
spdxId = "PolyForm-Small-Business-1.0.0";
url = "https://spdx.org/licenses/PolyForm-Small-Business-1.0.0.html";
}
{
free = false;
fullName = "PolyForm Free Trial License 1.0.0";
redistributable = true;
url = "https://polyformproject.org/licenses/free-trial/1.0.0/";
}
];
};
passthru.updateScript = writeScript "update-matrix-media-repo" ''
${../../scripts/update-git.sh} "https://github.com/drone-runners/drone-runner-docker" ci/drone-runner-docker/source.json
if [ "$(git diff -- ci/drone-runner-docker/source.json)" ]; then
SRC_PATH=$(nix-build -E '(import ./. {}).${pname}.src')
${../../scripts/update-go.sh} ./ci/drone-runner-docker ci/drone-runner-docker/goVendor.hash
fi
'';
}