From adf112ea45f82c41914b792f8764df87d40ad5e7 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 5 Apr 2023 19:29:06 -0700 Subject: [PATCH] evince: disable dvi support if cross-compiling The only thing preventing cross compilation of evince is the fact that one of its dependencies (texlive) cannot be cross-compiled. Let's just omit DVI support in that scenario, rather than fail to build completely. --- pkgs/desktops/gnome/core/evince/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/desktops/gnome/core/evince/default.nix b/pkgs/desktops/gnome/core/evince/default.nix index d561ad6646a2e..91454c99c8bb2 100644 --- a/pkgs/desktops/gnome/core/evince/default.nix +++ b/pkgs/desktops/gnome/core/evince/default.nix @@ -37,6 +37,7 @@ , supportMultimedia ? true # PDF multimedia , libgxps , supportXPS ? true # Open XML Paper Specification via libgxps +, supportDvi ? stdenv.buildPlatform.canExecute stdenv.hostPlatform # texlive does not cross-compile , withLibsecret ? true }: @@ -83,6 +84,7 @@ stdenv.mkDerivation rec { libxml2 pango poppler + ] ++ lib.optionals supportDvi [ texlive.bin.core # kpathsea for DVI support ] ++ lib.optionals withLibsecret [ libsecret @@ -100,6 +102,7 @@ stdenv.mkDerivation rec { mesonFlags = [ "-Dnautilus=false" "-Dps=enabled" + (lib.mesonEnable "dvi" supportDvi) ] ++ lib.optionals (!withLibsecret) [ "-Dkeyring=disabled" ] ++ lib.optionals (!supportMultimedia) [