From 6bd9402c5ff2e6450689666e5fd6ae8c8ef3c70a Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Sat, 3 Jun 2023 01:35:10 +0200 Subject: [PATCH] cups: fix build on darwin --- pkgs/misc/cups/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index abff4d817975..44e46355d0bf 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -1,6 +1,5 @@ { lib, stdenv , fetchurl -, fetchpatch , pkg-config , removeReferencesTo , zlib @@ -41,6 +40,9 @@ stdenv.mkDerivation rec { # service would stop the socket and break subsequent socket activations. # See https://github.com/apple/cups/issues/6005 sed -i '/PartOf=cups.service/d' scheduler/cups.socket.in + '' + lib.optionalString (stdenv.isDarwin && lib.versionOlder stdenv.targetPlatform.darwinSdkVersion "12") '' + substituteInPlace backend/usb-darwin.c \ + --replace "kIOMainPortDefault" "kIOMasterPortDefault" ''; nativeBuildInputs = [ pkg-config removeReferencesTo ];