SDL2_mixer: add "dev" output

`SDL2_mixer` is a a popular game dependency. Split it's `dev` output to
separate store path to reduce runtime closure size.

While at it amend a few games's include paths.
This commit is contained in:
Sergei Trofimovich 2022-09-18 11:48:40 +01:00
parent 9c2a7cc09d
commit 83b01dd4ec
5 changed files with 8 additions and 6 deletions

View File

@ -47,6 +47,8 @@ stdenv.mkDerivation rec {
timidity
];
outputs = [ "out" "dev" ];
# fix default path to timidity.cfg so MIDI files could be played
postPatch = ''
substituteInPlace timidity/options.h \

View File

@ -58,7 +58,7 @@ in stdenv.mkDerivation rec {
done
'';
NIX_CFLAGS_COMPILE = "-I${SDL2.dev}/include/SDL2 -I${SDL2_mixer}/include/SDL2";
NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2}/include/SDL2 -I${lib.getDev SDL2_mixer}/include/SDL2";
makeFlags = [
"SDLCONFIG=${SDL2}/bin/sdl2-config"

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
cmakeFlags = ["-DCMAKE_CXX_FLAGS=-DWIZARD"];
# Help CMake find SDL_mixer.h
NIX_CFLAGS_COMPILE = "-I${SDL2_mixer}/include/SDL2";
NIX_CFLAGS_COMPILE = "-I${lib.getDev SDL2_mixer}/include/SDL2";
# Create "ivan.desktop" file
ivanDesktop = makeDesktopItem {

View File

@ -60,8 +60,8 @@ in stdenv.mkDerivation rec {
"-DSRB2_ASSET_DIRECTORY=/build/source/assets"
"-DGME_INCLUDE_DIR=${game-music-emu}/include"
"-DOPENMPT_INCLUDE_DIR=${libopenmpt.dev}/include"
"-DSDL2_MIXER_INCLUDE_DIR=${SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2"
"-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2}/include/SDL2"
];
patches = [

View File

@ -52,8 +52,8 @@ in stdenv.mkDerivation rec {
cmakeFlags = [
#"-DSRB2_ASSET_DIRECTORY=/build/source/assets"
"-DGME_INCLUDE_DIR=${game-music-emu}/include"
"-DSDL2_MIXER_INCLUDE_DIR=${SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2"
"-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${lib.getDev SDL2}/include/SDL2"
];
patches = [