about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/keycloak/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/servers/keycloak/default.nix')
-rw-r--r--nixpkgs/pkgs/servers/keycloak/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/servers/keycloak/default.nix b/nixpkgs/pkgs/servers/keycloak/default.nix
index b2bd54c56b2c..8a395d917caa 100644
--- a/nixpkgs/pkgs/servers/keycloak/default.nix
+++ b/nixpkgs/pkgs/servers/keycloak/default.nix
@@ -5,12 +5,18 @@
 , jre
 , nixosTests
 , callPackage
-
 , confFile ? null
 , plugins ? [ ]
+, extraFeatures ? [ ]
+, disabledFeatures ? [ ]
 }:
 
-stdenv.mkDerivation rec {
+let
+  featuresSubcommand = ''
+    ${lib.optionalString (extraFeatures != [ ]) "--features=${lib.concatStringsSep "," extraFeatures}"} \
+    ${lib.optionalString (disabledFeatures != [ ]) "--features-disabled=${lib.concatStringsSep "," disabledFeatures}"}
+  '';
+in stdenv.mkDerivation rec {
   pname = "keycloak";
   version = "22.0.1";
 
@@ -44,7 +50,7 @@ stdenv.mkDerivation rec {
     patchShebangs bin/kc.sh
     export KC_HOME_DIR=$(pwd)
     export KC_CONF_DIR=$(pwd)/conf
-    bin/kc.sh build
+    bin/kc.sh build ${featuresSubcommand}
 
     runHook postBuild
   '';