Merge pull request #118081 from sbruder/drone-oss

drone: add option to build oss edition
This commit is contained in:
Sandro 2021-04-01 01:46:31 +02:00 committed by GitHub
commit ffa7b3d619
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 3 deletions

View File

@ -1,7 +1,8 @@
{ lib, fetchFromGitHub, buildGoModule }:
{ lib, fetchFromGitHub, buildGoModule
, enableUnfree ? true }:
buildGoModule rec {
name = "drone.io-${version}";
pname = "drone.io${lib.optionalString (!enableUnfree) "-oss"}";
version = "1.10.0";
vendorSha256 = "sha256-cKHX/GnvGELQBfoo0/1UmDQ4Z66GGnnHG7+1CzjinL0=";
@ -15,9 +16,13 @@ buildGoModule rec {
sha256 = "sha256-12Jac+mXWdUX8gWvmpdO9ROv7Bi0YzvyqnNDVNJOr34=";
};
preBuild = ''
buildFlagsArray+=( "-tags" "${lib.optionalString (!enableUnfree) "oss nolimit"}" )
'';
meta = with lib; {
maintainers = with maintainers; [ elohmeier vdemeester ];
license = licenses.asl20;
license = with licenses; if enableUnfree then unfreeRedistributable else asl20;
description = "Continuous Integration platform built on container technology";
};
}

View File

@ -3881,6 +3881,9 @@ in
};
drone = callPackage ../development/tools/continuous-integration/drone { };
drone-oss = callPackage ../development/tools/continuous-integration/drone {
enableUnfree = false;
};
drone-cli = callPackage ../development/tools/continuous-integration/drone-cli { };