From abaf2bd3823aae703289f3ccb25b13742a992499 Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sun, 2 Mar 2025 13:15:35 +0100 Subject: [PATCH 1/2] SDL_compat: use SDL3 through sdl2-compat --- pkgs/by-name/sd/SDL_compat/package.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sd/SDL_compat/package.nix b/pkgs/by-name/sd/SDL_compat/package.nix index c1d02ce324b6e..fd6f20ee1377b 100644 --- a/pkgs/by-name/sd/SDL_compat/package.nix +++ b/pkgs/by-name/sd/SDL_compat/package.nix @@ -1,11 +1,12 @@ { lib, - SDL2, + sdl2-compat, cmake, darwin, fetchFromGitHub, libGLU, libiconv, + libX11, mesa, pkg-config, stdenv, @@ -39,7 +40,10 @@ stdenv.mkDerivation (finalAttrs: { ]; propagatedBuildInputs = - [ SDL2 ] + [ + libX11 + sdl2-compat + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv Cocoa From 7aeac03f40021f4b213d460ef5813e52184368db Mon Sep 17 00:00:00 2001 From: Marcin Serwin Date: Sat, 15 Mar 2025 10:08:18 +0100 Subject: [PATCH 2/2] SDL_compat: don't propagate build inputs --- pkgs/by-name/sd/SDL_compat/package.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/sd/SDL_compat/package.nix b/pkgs/by-name/sd/SDL_compat/package.nix index fd6f20ee1377b..b0000e6602437 100644 --- a/pkgs/by-name/sd/SDL_compat/package.nix +++ b/pkgs/by-name/sd/SDL_compat/package.nix @@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: { autoSignDarwinBinariesHook ]; - propagatedBuildInputs = + buildInputs = [ libX11 sdl2-compat @@ -71,14 +71,12 @@ stdenv.mkDerivation (finalAttrs: { if stdenv.hostPlatform.isDarwin then '' install_name_tool ${ - lib.strings.concatMapStrings ( - x: " -add_rpath ${lib.makeLibraryPath [ x ]} " - ) finalAttrs.propagatedBuildInputs + lib.strings.concatMapStrings (x: " -add_rpath ${lib.makeLibraryPath [ x ]} ") finalAttrs.buildInputs } "$lib" '' else '' - patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath finalAttrs.propagatedBuildInputs}" "$lib" + patchelf --set-rpath "$(patchelf --print-rpath $lib):${lib.makeLibraryPath finalAttrs.buildInputs}" "$lib" '' } fi