git.iko.soy/typeable/nixpkgs
on master help sign in
drone: add option to build oss edition

By default drone is distributed under an unfree license that only permits non-commercial or evaluation use. To build the OSS edition, two tags have to be passed as build flags. This commit adds an option to build the OSS edition to the package and defines drone-oss as an alias for this.

commitd04389aeb29f1074b68a16cbf0f99efc7a298367 authorSimon Bruder <simon@sbruder.de> dateTue 30 Mar 2021, 17:16 (6 years ago) parent8c3cecb
2 files changed+11−3
pkgs/development/tools/continuous-integration/drone/default.nix+8−3 pkgs/top-level/all-packages.nix+3
pkgs/development/tools/continuous-integration/drone/default.nix+8−3
@@ -1,7 +1,8 @@
1−{ lib, fetchFromGitHub, buildGoModule }:
1+{ lib, fetchFromGitHub, buildGoModule
2+, enableUnfree ? true }:
23
34buildGoModule rec {
4− name = "drone.io-${version}";
5+ pname = "drone.io${lib.optionalString (!enableUnfree) "-oss"}";
56 version = "1.10.0";
67
78 vendorSha256 = "sha256-cKHX/GnvGELQBfoo0/1UmDQ4Z66GGnnHG7+1CzjinL0=";
@@ -15,9 +16,13 @@ buildGoModule rec {
1516 sha256 = "sha256-12Jac+mXWdUX8gWvmpdO9ROv7Bi0YzvyqnNDVNJOr34=";
1617 };
1718
19+ preBuild = ''
20+ buildFlagsArray+=( "-tags" "${lib.optionalString (!enableUnfree) "oss nolimit"}" )
21+ '';
22+
1823 meta = with lib; {
1924 maintainers = with maintainers; [ elohmeier vdemeester ];
20− license = licenses.asl20;
25+ license = with licenses; if enableUnfree then unfreeRedistributable else asl20;
2126 description = "Continuous Integration platform built on container technology";
2227 };
2328}
pkgs/top-level/all-packages.nix+3
@@ -3869,6 +3869,9 @@ in
38693869 };
38703870
38713871 drone = callPackage ../development/tools/continuous-integration/drone { };
3872+ drone-oss = callPackage ../development/tools/continuous-integration/drone {
3873+ enableUnfree = false;
3874+ };
38723875
38733876 drone-cli = callPackage ../development/tools/continuous-integration/drone-cli { };
38743877