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 timidity
]; ];
outputs = [ "out" "dev" ];
# fix default path to timidity.cfg so MIDI files could be played # fix default path to timidity.cfg so MIDI files could be played
postPatch = '' postPatch = ''
substituteInPlace timidity/options.h \ substituteInPlace timidity/options.h \

View file

@ -58,7 +58,7 @@ in stdenv.mkDerivation rec {
done 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 = [ makeFlags = [
"SDLCONFIG=${SDL2}/bin/sdl2-config" "SDLCONFIG=${SDL2}/bin/sdl2-config"

View file

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
cmakeFlags = ["-DCMAKE_CXX_FLAGS=-DWIZARD"]; cmakeFlags = ["-DCMAKE_CXX_FLAGS=-DWIZARD"];
# Help CMake find SDL_mixer.h # 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 # Create "ivan.desktop" file
ivanDesktop = makeDesktopItem { ivanDesktop = makeDesktopItem {

View file

@ -60,8 +60,8 @@ in stdenv.mkDerivation rec {
"-DSRB2_ASSET_DIRECTORY=/build/source/assets" "-DSRB2_ASSET_DIRECTORY=/build/source/assets"
"-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=${SDL2_mixer}/include/SDL2" "-DSDL2_MIXER_INCLUDE_DIR=${lib.getDev SDL2_mixer}/include/SDL2"
"-DSDL2_INCLUDE_DIR=${SDL2.dev}/include/SDL2" "-DSDL2_INCLUDE_DIR=${lib.getDev SDL2}/include/SDL2"
]; ];
patches = [ patches = [

View file

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