From a99bf0ec51213ddaf931272bc4b89e7e39f9b9aa Mon Sep 17 00:00:00 2001
From: William Kral <william.kral@gmail.com>
Date: Thu, 12 May 2022 16:28:46 -0700
Subject: [PATCH] pappl: fix build

---
 pkgs/applications/printing/pappl/default.nix | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pkgs/applications/printing/pappl/default.nix b/pkgs/applications/printing/pappl/default.nix
index 5df1d93f9c82..4c0bcfb4ed38 100644
--- a/pkgs/applications/printing/pappl/default.nix
+++ b/pkgs/applications/printing/pappl/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv, fetchFromGitHub
+, fetchpatch
 , avahi
 , cups
 , gnutls
@@ -21,6 +22,14 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-FsmR0fFb9bU9G3oUyJU1eDLcoZ6OQ2//TINlPrW6lU0=";
   };
 
+  patches = [
+    (fetchpatch {
+      name = "file-offset-bits-64-linux.patch";
+      url = "https://github.com/michaelrsweet/pappl/commit/7ec4ce4331b6637c54a37943269e05d15ff6dd47.patch";
+      sha256 = "sha256-x5lriopWw6Mn2qjv19flsleEzPMHU4jYWRy0y6hTL5k=";
+    })
+  ];
+
   outputs = [ "out" "dev" ];
 
   nativeBuildInputs = [