treewide: replace references to SDL2.dev with lib.getDev and lib.getInclude

This commit is contained in:
Grimmauld 2025-03-08 18:11:11 +01:00
parent 16d30c563d
commit 9b5f94b51f
No known key found for this signature in database
16 changed files with 17 additions and 17 deletions

View file

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = toString ( env.NIX_CFLAGS_COMPILE = toString (
[ [
"-I${SDL2.dev}/include/SDL2" "-I${lib.getInclude SDL2}/include/SDL2"
"-I${SDL2_net.dev}/include/SDL2" "-I${SDL2_net.dev}/include/SDL2"
] ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ ++ lib.optionals stdenv.hostPlatform.isDarwin [

View file

@ -68,7 +68,7 @@ stdenv.mkDerivation {
]; ];
env.NIX_CFLAGS_COMPILE = toString [ env.NIX_CFLAGS_COMPILE = toString [
"-I${SDL2.dev}/include/SDL2" "-I${lib.getInclude SDL2}/include/SDL2"
]; ];
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -32,7 +32,7 @@ stdenv.mkDerivation (finalAttrs: {
SDL2_image SDL2_image
]; ];
# From some reason, this is needed as otherwise SDL.h is not found # From some reason, this is needed as otherwise SDL.h is not found
NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; NIX_CFLAGS_COMPILE = "-I${lib.getInclude SDL2}/include/SDL2";
outputs = [ outputs = [
"out" "out"

View file

@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = [ buildInputs = [
libpulseaudio libpulseaudio
SDL2 SDL2
SDL2.dev (lib.getDev SDL2)
SDL2_image SDL2_image
SDL2_ttf SDL2_ttf
alsa-lib alsa-lib
@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ]; makeFlags = [ "-f Makefile.PatternPlayer_debian_RtAudio_sdl20" ];
env.NIX_CFLAGS_COMPILE = toString [ "-I${SDL2.dev}/include/SDL2" ]; env.NIX_CFLAGS_COMPILE = toString [ "-I${lib.getInclude SDL2}/include/SDL2" ];
hardeningDisable = [ "format" ]; hardeningDisable = [ "format" ];

View file

@ -46,7 +46,7 @@ stdenv.mkDerivation rec {
SDL2 SDL2
glibc glibc
]; ];
env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2"; env.NIX_CFLAGS_COMPILE = "-I${lib.getInclude SDL2}/include/SDL2";
enableParallelBuilding = true; enableParallelBuilding = true;
postPatch = '' postPatch = ''

View file

@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
# Expects SDL2.framework in specific location, which we don't have # Expects SDL2.framework in specific location, which we don't have
# Change where SDL2 headers are searched for to match what we do have # Change where SDL2 headers are searched for to match what we do have
substituteInPlace RecastDemo/CMakeLists.txt \ substituteInPlace RecastDemo/CMakeLists.txt \
--replace 'include_directories(''${SDL2_LIBRARY}/Headers)' 'include_directories(${SDL2.dev}/include/SDL2)' --replace 'include_directories(''${SDL2_LIBRARY}/Headers)' 'include_directories(${lib.getInclude SDL2}/include/SDL2)'
''; '';
doCheck = true; doCheck = true;

View file

@ -77,7 +77,7 @@ stdenv.mkDerivation (finalAttrs: {
libGLU libGLU
libpng libpng
SDL2 SDL2
SDL2.dev (lib.getDev SDL2)
zlib zlib
]; ];

View file

@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
preBuild = '' preBuild = ''
substituteInPlace src/Makefile \ substituteInPlace src/Makefile \
--replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \ --replace "CC = gcc" "CC = ${stdenv.cc.targetPrefix}cc" \
--replace "CFLAGS += -I/opt/local/include" "CFLAGS += -I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2" --replace "CFLAGS += -I/opt/local/include" "CFLAGS += -I${lib.getInclude SDL2}/include/SDL2 -I${SDL2_image}/include/SDL2"
''; '';
# The prince binary expects two things of the working directory it is called from: # The prince binary expects two things of the working directory it is called from:

View file

@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
moveToOutput bin/smpeg2-config "$dev" moveToOutput bin/smpeg2-config "$dev"
wrapProgram $dev/bin/smpeg2-config \ wrapProgram $dev/bin/smpeg2-config \
--prefix PATH ":" "${pkg-config}/bin" \ --prefix PATH ":" "${pkg-config}/bin" \
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig" --prefix PKG_CONFIG_PATH ":" "${lib.getDev SDL2}/lib/pkgconfig"
''; '';
enableParallelBuilding = true; enableParallelBuilding = true;

View file

@ -72,7 +72,7 @@ stdenv.mkDerivation (finalAttrs: {
"-DGME_INCLUDE_DIR=${game-music-emu}/include" "-DGME_INCLUDE_DIR=${game-music-emu}/include"
"-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include" "-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
"-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2" "-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2.dev}/include/SDL2" "-DSDL2_INCLUDE_DIR=${lib.getInclude SDL2}/include/SDL2"
]; ];
patches = [ patches = [

View file

@ -48,7 +48,7 @@ stdenv.mkDerivation (finalAttrs: {
makeFlags = [ makeFlags = [
"-Clinux" "-Clinux"
"VERSION=${finalAttrs.version}" "VERSION=${finalAttrs.version}"
"CFLAGS+=-I${SDL2.dev}/include/SDL2" "CFLAGS+=-I${lib.getInclude SDL2}/include/SDL2"
"CFLAGS+=-I${SDL2_image}/include/SDL2" "CFLAGS+=-I${SDL2_image}/include/SDL2"
"DIST_PATH=$(out)" "DIST_PATH=$(out)"
"CC=${stdenv.cc.targetPrefix}cc" "CC=${stdenv.cc.targetPrefix}cc"

View file

@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
# disable parallel building as it caused sporadic build failures # disable parallel building as it caused sporadic build failures
enableParallelBuilding = false; enableParallelBuilding = false;
env.NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_ttf}/include/SDL2"; env.NIX_CFLAGS_COMPILE = "-I${lib.getInclude SDL2}/include/SDL2 -I${SDL2_image}/include/SDL2 -I${SDL2_ttf}/include/SDL2";
makeFlags = [ "config=release" ]; makeFlags = [ "config=release" ];

View file

@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
cd src cd src
sed s,lSDL2main,lSDL2, -i GNUmakefile sed s,lSDL2main,lSDL2, -i GNUmakefile
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${SDL2.dev}/include/SDL2" export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${lib.getInclude SDL2}/include/SDL2"
''; '';
makeFlags = [ makeFlags = [

View file

@ -117,7 +117,7 @@ buildPythonPackage rec {
env = env =
{ {
SDL_CONFIG = "${SDL2.dev}/bin/sdl2-config"; SDL_CONFIG = lib.getExe' (lib.getDev SDL2) "sdl2-config";
} }
// lib.optionalAttrs stdenv.cc.isClang { // lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types"; NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-function-pointer-types";

View file

@ -49,7 +49,7 @@ stdenv.mkDerivation rec {
cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [ cmakeFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}" "-DCMAKE_OSX_ARCHITECTURES=${stdenv.hostPlatform.darwinArch}"
# Expects SDL2.framework in specific location, which we don't have # Expects SDL2.framework in specific location, which we don't have
"-DSDL2_INCLUDE_DIRS=${SDL2.dev}/include/SDL2" "-DSDL2_INCLUDE_DIRS=${lib.getInclude SDL2}/include/SDL2"
]; ];
installPhase = installPhase =

View file

@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
env.NIX_CFLAGS_COMPILE = toString [ env.NIX_CFLAGS_COMPILE = toString [
"-I${SDL2.dev}/include/SDL2" "-I${lib.getInclude SDL2}/include/SDL2"
"-I${opusfile.dev}/include/opus" "-I${opusfile.dev}/include/opus"
]; ];
NIX_CFLAGS_LINK = [ "-lSDL2" ]; NIX_CFLAGS_LINK = [ "-lSDL2" ];