summary refs log tree commit diff
path: root/pkgs/os-specific/linux/audit/default.nix
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-03-17 19:28:09 +0100
committersterni <sternenseemann@systemli.org>2022-03-18 22:45:20 +0100
commitfcb6bb628b199f82f5209bf27ba747e6585fe69e (patch)
treecaaa0b3f57bcca0546af30a84100e9f36d5d93aa /pkgs/os-specific/linux/audit/default.nix
parentde8120a340d589f1c8fe9d10c928d7bfb26f8d69 (diff)
downloadnixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar.gz
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar.bz2
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar.lz
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar.xz
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.tar.zst
nixpkgs-fcb6bb628b199f82f5209bf27ba747e6585fe69e.zip
audit: disable python when cross-compiling
To support this theoretically, the configure script upstream would need
to a) stop using PATH for finding python-config exclusively and allow
passing an absolute path to it and b) cease using the distutils module
for configuration purposes which of course requires running the host
python interpreter which is not possible in the cross case.
Diffstat (limited to 'pkgs/os-specific/linux/audit/default.nix')
-rw-r--r--pkgs/os-specific/linux/audit/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/audit/default.nix b/pkgs/os-specific/linux/audit/default.nix
index de71b7d8c3e..e9762f44dcd 100644
--- a/pkgs/os-specific/linux/audit/default.nix
+++ b/pkgs/os-specific/linux/audit/default.nix
@@ -3,7 +3,10 @@
   runCommand,
   autoreconfHook,
   autoconf, automake, libtool,
-  enablePython ? true, python3, swig,
+  # Enabling python support while cross compiling would be possible, but
+  # the configure script tries executing python to gather info instead of
+  # relying on python3-config exclusively
+  enablePython ? stdenv.hostPlatform == stdenv.buildPlatform, python3, swig,
   linuxHeaders ? stdenv.cc.libc.linuxHeaders
 }: