about summary refs log tree commit diff
path: root/pkgs/applications/misc/zathura
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-04-05 16:05:42 -0700
committerAdam Joseph <adam@westernsemico.com>2023-04-23 19:51:09 -0700
commitabab00a89c60a866bfcaecdcdd451d5814881624 (patch)
treed30ae5e845e76ac99839246c2be20038dacc2968 /pkgs/applications/misc/zathura
parentca50dac040483147bafaabc496db9bdab2d1d440 (diff)
zathura: fix cross by disabling tests, adding `check`
The only part of zathura that won't cross compile is the tests.

Let's disable these so the binaries at least can be cross-built.

This commit also adds `check` to `buildInputs` and fixes the
reference to `sphinx`.

Co-authored-by: apfelkuchen6 <73002165+apfelkuchen6@users.noreply.github.com>
Co-authored-by: Artturi <Artturin@artturin.com>
Diffstat (limited to 'pkgs/applications/misc/zathura')
-rw-r--r--pkgs/applications/misc/zathura/core/default.nix17
1 files changed, 9 insertions, 8 deletions
diff --git a/pkgs/applications/misc/zathura/core/default.nix b/pkgs/applications/misc/zathura/core/default.nix
index 84015ba4a3fc6..6282b812b2499 100644
--- a/pkgs/applications/misc/zathura/core/default.nix
+++ b/pkgs/applications/misc/zathura/core/default.nix
@@ -6,12 +6,12 @@
 , gtk-mac-integration
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "zathura";
   version = "0.5.2";
 
   src = fetchurl {
-    url = "https://pwmt.org/projects/${pname}/download/${pname}-${version}.tar.xz";
+    url = "https://pwmt.org/projects/zathura/download/zathura-${finalAttrs.version}.tar.xz";
     sha256 = "15314m9chmh5jkrd9vk2h2gwcwkcffv2kjcxkd4v3wmckz5sfjy6";
   };
 
@@ -25,16 +25,17 @@ stdenv.mkDerivation rec {
     "-Dconvert-icon=enabled"
     "-Dsynctex=enabled"
     # Make sure tests are enabled for doCheck
-    "-Dtests=enabled"
-  ] ++ lib.optional (!stdenv.isLinux) "-Dseccomp=disabled";
+    (lib.mesonEnable "tests" finalAttrs.finalPackage.doCheck)
+    (lib.mesonEnable "seccomp" stdenv.hostPlatform.isLinux)
+  ];
 
   nativeBuildInputs = [
-    meson ninja pkg-config desktop-file-utils python3.pkgs.sphinx
-    gettext wrapGAppsHook libxml2 check appstream-glib
+    meson ninja pkg-config desktop-file-utils python3.pythonForBuild.pkgs.sphinx
+    gettext wrapGAppsHook libxml2 appstream-glib
   ];
 
   buildInputs = [
-    gtk girara libintl sqlite glib file librsvg
+    gtk girara libintl sqlite glib file librsvg check
     texlive.bin.core
   ] ++ lib.optional stdenv.isLinux libseccomp
     ++ lib.optional stdenv.isDarwin gtk-mac-integration;
@@ -48,4 +49,4 @@ stdenv.mkDerivation rec {
     platforms = platforms.unix;
     maintainers = with maintainers; [ globin ];
   };
-}
+})