From f318c22bbe648729d0a9adf26bd9d387f1fb42b2 Mon Sep 17 00:00:00 2001 From: "Travis A. Everett" Date: Sun, 7 Apr 2024 14:46:28 -0500 Subject: [PATCH] pdfmm: fix build on (at least) macOS The package isn't marked linux-only, but pulling locale from glibc effectively limited it to linux. Using the generalized locale attr gets it building on macOS. Also: - While looking into this, I noticed that the script only uses xmessage if zenity isn't present, so I think we can drop that dependency. - Not super familiar with what the package should run on, but I went ahead and set the platform meta based on what I've personally verified. --- pkgs/applications/office/pdfmm/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/office/pdfmm/default.nix b/pkgs/applications/office/pdfmm/default.nix index 08dd9eea9bbd..5be76fa51685 100644 --- a/pkgs/applications/office/pdfmm/default.nix +++ b/pkgs/applications/office/pdfmm/default.nix @@ -2,12 +2,11 @@ , coreutils , fetchFromGitHub , ghostscript -, glibc +, locale , gnome , gnused , lib , resholve -, xorg }: resholve.mkDerivation rec { @@ -35,15 +34,16 @@ resholve.mkDerivation rec { inputs = [ coreutils ghostscript - glibc + locale gnome.zenity gnused - xorg.xmessage ]; + fake = { + # only need xmessage if zenity is unavailable + external = [ "xmessage" ]; + }; execer = [ - "cannot:${glibc.bin}/bin/locale" "cannot:${gnome.zenity}/bin/zenity" - "cannot:${xorg.xmessage}/bin/xmessage" ]; keep."$toutLu" = true; }; @@ -54,5 +54,6 @@ resholve.mkDerivation rec { license = licenses.gpl3Only; maintainers = with maintainers; [ urandom ]; mainProgram = "pdfmm"; + platforms = platforms.linux ++ platforms.darwin; }; }