Unverified Commit 6f33da55 authored by r-vdp's avatar r-vdp
Browse files

rollo-printer: use pkg-config instead of native cups

configure looks for CUPS via pkg-config first and only falls back to
cups-config. With strictDeps the build-platform cups-config leaks
build-platform -I/-L flags into the cross build (ld warns about
"skipping incompatible libcups.so" and only links because the cc-wrapper
adds the host cups via NIX_LDFLAGS). The cross-aware pkg-config wrapper
picks up the host cups.pc directly, so cups no longer needs to be a
native input.
parent c2271c2b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  cups,
  fetchurl,
  lib,
  pkg-config,
  stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
@@ -13,10 +14,13 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-v61/5HY25cvhVbHF+dXOOGrDfZZzvvicJEy7MKTAG10=";
  };

  nativeBuildInputs = [ cups ];
  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ cups ];

  # configure unconditionally derives CUPS_DATADIR/CUPS_SERVERBIN from
  # pkg-config, which points into the cups store path; override at make time
  # so the filter and PPD are installed into $out instead.
  makeFlags = [
    "CUPS_DATADIR=${placeholder "out"}/share/cups"
    "CUPS_SERVERBIN=${placeholder "out"}/lib/cups"