summary refs log tree commit diff
path: root/pkgs/tools/networking
diff options
context:
space:
mode:
authorMartin Weinelt <mweinelt@users.noreply.github.com>2023-10-30 19:58:40 +0100
committerGitHub <noreply@github.com>2023-10-30 19:58:40 +0100
commita90ad78067774e17065fa7a01e6e44e5fa9eceaa (patch)
tree1d185a78dc2637b896513609a074af9a484fe71a /pkgs/tools/networking
parentfe1e9d524b7ac9fac5f8be3ea2a7d177a5a4b4dc (diff)
parent5628aeb5b08e2857df4ceb506b682836a0269d39 (diff)
downloadnixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar.gz
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar.bz2
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar.lz
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar.xz
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.tar.zst
nixpkgs-a90ad78067774e17065fa7a01e6e44e5fa9eceaa.zip
Merge pull request #263516 from jmbaur/kea-cross-compile
kea: allow kea to cross-compile
Diffstat (limited to 'pkgs/tools/networking')
-rw-r--r--pkgs/tools/networking/kea/default.nix12
1 files changed, 8 insertions, 4 deletions
diff --git a/pkgs/tools/networking/kea/default.nix b/pkgs/tools/networking/kea/default.nix
index 7c3cab0fe5a..2e642b17f87 100644
--- a/pkgs/tools/networking/kea/default.nix
+++ b/pkgs/tools/networking/kea/default.nix
@@ -5,8 +5,11 @@
 # build time
 , autoreconfHook
 , pkg-config
+, python3Packages
 
 # runtime
+, withMysql ? stdenv.buildPlatform.system == stdenv.hostPlatform.system
+, withPostgres ? stdenv.buildPlatform.system == stdenv.hostPlatform.system
 , boost
 , libmysqlclient
 , log4cplus
@@ -48,9 +51,10 @@ stdenv.mkDerivation rec {
     "--enable-shell"
     "--localstatedir=/var"
     "--with-openssl=${lib.getDev openssl}"
-    "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config"
-    "--with-pgsql=${postgresql}/bin/pg_config"
-  ];
+  ]
+  ++ lib.optional withPostgres "--with-pgsql=${postgresql}/bin/pg_config"
+  ++ lib.optional withMysql "--with-mysql=${lib.getDev libmysqlclient}/bin/mysql_config";
+
   postConfigure = ''
     # Mangle embedded paths to dev-only inputs.
     sed -e "s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i config.report
@@ -59,7 +63,7 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     autoreconfHook
     pkg-config
-  ] ++ (with python3.pkgs; [
+  ] ++ (with python3Packages; [
     sphinxHook
     sphinx-rtd-theme
   ]);