From 2c5682c927e612b785a250fbcf774593943c6fad Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 7 Jun 2023 10:22:15 -0700 Subject: recoll: add withPython parameter Cross-compiling the recoll python modules does not work and is not easy to fix; for now we disable them. --- pkgs/applications/search/recoll/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); }; } -- cgit 1.4.1