git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #118081 from sbruder/drone-oss

drone: add option to build oss edition

commitffa7b3d619d743eb0786646e19a06661aaded456 authorSandro <sandro.jaeckel@gmail.com> dateThu 1 Apr 2021, 01:46 (6 years ago) parentb2ebc88d04389a
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
@@ -3881,6 +3881,9 @@ in
38813881 };
38823882
38833883 drone = callPackage ../development/tools/continuous-integration/drone { };
3884+ drone-oss = callPackage ../development/tools/continuous-integration/drone {
3885+ enableUnfree = false;
3886+ };
38843887
38853888 drone-cli = callPackage ../development/tools/continuous-integration/drone-cli { };
38863889