From f225300be4c95a1b03031e5522f389b9ba42a152 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 17:15:30 -0600 Subject: [PATCH 1/3] aribb25: format --- .../development/libraries/aribb25/default.nix | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/pkgs/development/libraries/aribb25/default.nix b/pkgs/development/libraries/aribb25/default.nix index 4079f6278235..2c22c586b6fb 100644 --- a/pkgs/development/libraries/aribb25/default.nix +++ b/pkgs/development/libraries/aribb25/default.nix @@ -1,12 +1,13 @@ -{ stdenv -, lib -, fetchFromGitLab -, fetchpatch -, autoreconfHook -, pkg-config -, pcsclite -, PCSC -, xcbuild +{ + stdenv, + lib, + fetchFromGitLab, + fetchpatch, + autoreconfHook, + pkg-config, + pcsclite, + PCSC, + xcbuild, }: stdenv.mkDerivation rec { @@ -29,23 +30,24 @@ stdenv.mkDerivation rec { ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; buildInputs = if stdenv.hostPlatform.isDarwin then [ PCSC ] else [ pcsclite ]; - patches = let - url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff"; - in [ - (fetchpatch { - name = "make-cli-pipes-work-1.patch"; - url = url "0425184dbf3fdaf59854af5f530da88b2196a57b"; - sha256 = "0ysm2jivpnqxz71vw1102616qxww2gx005i0c5lhi6jbajqsa1cd"; - }) - (fetchpatch { - name = "make-cli-pipes-work-2.patch"; - url = url "cebabeab2bda065dca1c9f033b42d391be866d86"; - sha256 = "1283kqv1r4rbaba0sv2hphkhcxgjkmh8ndlcd24fhx43nn63hd28"; - }) - ]; + patches = + let + url = commit: "https://code.videolan.org/videolan/${pname}/-/commit/${commit}.diff"; + in + [ + (fetchpatch { + name = "make-cli-pipes-work-1.patch"; + url = url "0425184dbf3fdaf59854af5f530da88b2196a57b"; + sha256 = "0ysm2jivpnqxz71vw1102616qxww2gx005i0c5lhi6jbajqsa1cd"; + }) + (fetchpatch { + name = "make-cli-pipes-work-2.patch"; + url = url "cebabeab2bda065dca1c9f033b42d391be866d86"; + sha256 = "1283kqv1r4rbaba0sv2hphkhcxgjkmh8ndlcd24fhx43nn63hd28"; + }) + ]; - buildFlags = - lib.optional stdenv.hostPlatform.isDarwin "pcsclite_CFLAGS=-I${PCSC}/Library/Frameworks/PCSC.framework/Headers"; + 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"; From 2cc02eca4defd10db8e770bf9204bc5688c89d27 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 17:16:24 -0600 Subject: [PATCH 2/3] aribb25: remove xcbuild Included in stdenv now. --- pkgs/development/libraries/aribb25/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aribb25/default.nix b/pkgs/development/libraries/aribb25/default.nix index 2c22c586b6fb..e90b99c2831a 100644 --- a/pkgs/development/libraries/aribb25/default.nix +++ b/pkgs/development/libraries/aribb25/default.nix @@ -7,7 +7,6 @@ pkg-config, pcsclite, PCSC, - xcbuild, }: stdenv.mkDerivation rec { @@ -27,7 +26,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook pkg-config - ] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild; + ]; + buildInputs = if stdenv.hostPlatform.isDarwin then [ PCSC ] else [ pcsclite ]; patches = From 8ec0aa7cb6b010f57be015b6633e2862271f2e08 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Mon, 4 Nov 2024 17:19:31 -0600 Subject: [PATCH 3/3] aribb25: fix darwin --- pkgs/development/libraries/aribb25/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/aribb25/default.nix b/pkgs/development/libraries/aribb25/default.nix index e90b99c2831a..2a0601a8875e 100644 --- a/pkgs/development/libraries/aribb25/default.nix +++ b/pkgs/development/libraries/aribb25/default.nix @@ -28,7 +28,11 @@ stdenv.mkDerivation rec { pkg-config ]; - buildInputs = if stdenv.hostPlatform.isDarwin then [ PCSC ] else [ pcsclite ]; + buildInputs = + lib.optionals stdenv.hostPlatform.isDarwin [ PCSC ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ pcsclite ]; + + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-deprecated-non-prototype"; patches = let @@ -47,8 +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";