Unverified Commit 0b64ddcf authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

aribb25: fix darwin build (#353728)

parents 5d6c33e2 8ec0aa7c
Loading
Loading
Loading
Loading
+31 −27
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, autoreconfHook
, pkg-config
, pcsclite
, PCSC
, xcbuild
{
  stdenv,
  lib,
  fetchFromGitLab,
  fetchpatch,
  autoreconfHook,
  pkg-config,
  pcsclite,
  PCSC,
}:

stdenv.mkDerivation rec {
@@ -26,12 +26,19 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [
    autoreconfHook
    pkg-config
  ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;
  buildInputs = if stdenv.hostPlatform.isDarwin then [ PCSC ] else [ pcsclite ];
  ];

  buildInputs =
    lib.optionals stdenv.hostPlatform.isDarwin [ PCSC ]
    ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite ];

  patches = let
  env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-deprecated-non-prototype";

  patches =
    let
      url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff";
  in [
    in
    [
      (fetchpatch {
        name = "make-cli-pipes-work-1.patch";
        url = url "0425184dbf3fdaf59854af5f530da88b2196a57b";
@@ -44,9 +51,6 @@ stdenv.mkDerivation rec {
      })
    ];

  buildFlags =
    lib.optional stdenv.hostPlatform.isDarwin "pcsclite_CFLAGS=-I${PCSC}/Library/Frameworks/PCSC.framework/Headers";

  meta = with lib; {
    description = "Sample implementation of the ARIB STD-B25 standard";
    homepage = "https://code.videolan.org/videolan/aribb25";