smpeg2: add "dev" and "man" outputs

`smpeg2` is an `SDL2_mixer` runtime dependency, a popular game
dependency. Split it's `dev` and `man` outputs to separate store path to
reduce runtime closure size.
This commit is contained in:
Sergei Trofimovich 2022-09-18 11:39:28 +01:00
parent 9c2a7cc09d
commit 7fe991a9b0

View File

@ -24,12 +24,15 @@ stdenv.mkDerivation rec {
buildInputs = [ SDL2 ]
++ lib.optional stdenv.isDarwin darwin.libobjc;
outputs = [ "out" "dev" "man" ];
preConfigure = ''
sh autogen.sh
'';
postInstall = ''
wrapProgram $out/bin/smpeg2-config \
moveToOutput bin/smpeg2-config "$dev"
wrapProgram $dev/bin/smpeg2-config \
--prefix PATH ":" "${pkg-config}/bin" \
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
'';