summary refs log tree commit diff
path: root/pkgs/development/libraries/talloc
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2020-10-02 13:22:35 -0400
committerFrederik Rietdijk <fridh@fridh.nl>2020-11-19 20:42:59 +0100
commit6501d9880c3f612afd417e7c45fff2f58f19009a (patch)
treec6c89bf2611c4d41e70276b4835a11eb1e539def /pkgs/development/libraries/talloc
parent11806b6ede420bbdb980ca1c36918b71e9ddc0a2 (diff)
downloadnixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar.gz
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar.bz2
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar.lz
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar.xz
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.tar.zst
nixpkgs-6501d9880c3f612afd417e7c45fff2f58f19009a.zip
talloc: fix cross-compilation to 32-bit platforms
Diffstat (limited to 'pkgs/development/libraries/talloc')
-rw-r--r--pkgs/development/libraries/talloc/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/development/libraries/talloc/default.nix b/pkgs/development/libraries/talloc/default.nix
index f464364e8a0..fa920d037a9 100644
--- a/pkgs/development/libraries/talloc/default.nix
+++ b/pkgs/development/libraries/talloc/default.nix
@@ -1,6 +1,6 @@
 { stdenv
 , fetchurl
-, python
+, python3
 , pkg-config
 , readline
 , libxslt
@@ -10,7 +10,7 @@
 , wafHook
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (rec {
   pname = "talloc";
   version = "2.3.1";
 
@@ -22,13 +22,14 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [
     pkg-config
     fixDarwinDylibNames
-    python
+    python3
     wafHook
     docbook-xsl-nons
     docbook_xml_dtd_42
   ];
 
   buildInputs = [
+    python3
     readline
     libxslt
   ];
@@ -56,4 +57,9 @@ stdenv.mkDerivation rec {
     license = licenses.gpl3;
     platforms = platforms.all;
   };
-}
+} // stdenv.lib.optionalAttrs (stdenv.hostPlatform != stdenv.buildPlatform) {
+  # python-config from build Python gives incorrect values when cross-compiling.
+  # If python-config is not found, the build falls back to using the sysconfig
+  # module, which works correctly when cross-compiling.
+  PYTHON_CONFIG = "/invalid";
+})