nixpkgs/pkgs/development/libraries/smpeg/default.nix

52 lines
1.3 KiB
Nix
Raw Normal View History

{ stdenv, fetchsvn, SDL, autoconf, automake, libtool, gtk2, m4, pkg-config, libGLU, libGL, makeWrapper }:
stdenv.mkDerivation rec {
name = "smpeg-svn${version}";
version = "390";
src = fetchsvn {
url = "svn://svn.icculus.org/smpeg/trunk";
rev = version;
sha256 = "0ynwn7ih5l2b1kpzpibns9bb9wzfjak7mgrb1ji0dkn2q5pv6lr0";
};
2017-01-17 16:12:49 -08:00
patches = [
./format.patch
./gcc6.patch
2019-01-17 00:26:35 -08:00
./libx11.patch
2017-01-17 16:12:49 -08:00
];
2012-09-26 16:29:53 -07:00
2017-01-17 16:12:49 -08:00
enableParallelBuilding = true;
2016-02-07 12:44:18 -08:00
2019-11-10 08:44:34 -08:00
buildInputs = [ SDL gtk2 libGLU libGL ];
2014-10-22 17:31:14 -07:00
nativeBuildInputs = [ autoconf automake libtool m4 pkg-config makeWrapper ];
preConfigure = ''
touch NEWS AUTHORS ChangeLog
2012-09-26 16:29:53 -07:00
sh autogen.sh
'';
postInstall = ''
sed -i -e 's,"SDL.h",<SDL/SDL.h>,' \
-e 's,"SDL_mutex.h",<SDL/SDL_mutex.h>,' \
-e 's,"SDL_audio.h",<SDL/SDL_audio.h>,' \
-e 's,"SDL_thread.h",<SDL/SDL_thread.h>,' \
-e 's,"SDL_types.h",<SDL/SDL_types.h>,' \
$out/include/smpeg/*.h
2014-10-22 17:31:14 -07:00
wrapProgram $out/bin/smpeg-config \
--prefix PATH ":" "${pkg-config}/bin" \
--prefix PKG_CONFIG_PATH ":" "${SDL.dev}/lib/pkgconfig"
'';
2019-10-29 17:12:09 -07:00
NIX_LDFLAGS = "-lX11";
meta = {
homepage = "http://icculus.org/smpeg/";
description = "MPEG decoding library";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix;
};
}