summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-06-07 10:22:15 -0700
committerEmery Hemingway <ehmry@posteo.net>2023-06-07 21:10:09 +0100
commit2c5682c927e612b785a250fbcf774593943c6fad (patch)
treeac4e9b227b1692fb0c071a38d993cbea6f9e0452
parent228833432d6a073ae980b14d40e01603c6683635 (diff)
downloadnixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar.gz
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar.bz2
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar.lz
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar.xz
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.tar.zst
nixpkgs-2c5682c927e612b785a250fbcf774593943c6fad.zip
recoll: add withPython parameter
Cross-compiling the recoll python modules does not work and is not
easy to fix; for now we disable them.
-rw-r--r--pkgs/applications/search/recoll/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/applications/search/recoll/default.nix b/pkgs/applications/search/recoll/default.nix
index cccb5680042..daf611b91f7 100644
--- a/pkgs/applications/search/recoll/default.nix
+++ b/pkgs/applications/search/recoll/default.nix
@@ -33,6 +33,7 @@
 , xapian
 , zlib
 , withGui ? true
+, withPython ? with stdenv; buildPlatform.canExecute hostPlatform
 }:
 
 mkDerivation rec {
@@ -48,6 +49,9 @@ mkDerivation rec {
     "--enable-recollq"
     "--disable-webkit"
     "--without-systemd"
+  ] ++ lib.optionals (!withPython) [
+    "--disable-python-module"
+    "--disable-python-chm"
   ] ++ lib.optionals (!withGui) [
     "--disable-qtgui"
     "--disable-x11mon"
@@ -67,7 +71,9 @@ mkDerivation rec {
   nativeBuildInputs = [
     file
     pkg-config
+  ] ++ lib.optionals withPython [
     python3Packages.setuptools
+  ] ++ [
     makeWrapper
     which
   ];
@@ -75,8 +81,10 @@ mkDerivation rec {
   buildInputs = [
     bison
     chmlib
+  ] ++ lib.optionals withPython [
     python3Packages.python
     python3Packages.mutagen
+  ] ++ [
     xapian
     zlib
   ] ++ lib.optionals withGui [
@@ -139,5 +147,8 @@ mkDerivation rec {
     license = licenses.gpl2Plus;
     platforms = platforms.unix;
     maintainers = with maintainers; [ jcumming ehmry ];
+
+    # `Makefile.am` assumes the ability to run the hostPlatform's python binary at build time
+    broken = withPython && (with stdenv; !buildPlatform.canExecute hostPlatform);
   };
 }