2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv
|
2020-11-28 08:54:45 +00:00
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, darwin
|
|
|
|
, fetchsvn
|
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, SDL2
|
|
|
|
}:
|
2017-08-26 22:23:31 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-11-28 08:54:45 +00:00
|
|
|
pname = "smpeg2";
|
|
|
|
version = "unstable-2017-10-18";
|
2017-08-26 22:23:31 +00:00
|
|
|
|
|
|
|
src = fetchsvn {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "svn://svn.icculus.org/smpeg/trunk";
|
2020-11-28 08:54:45 +00:00
|
|
|
rev = "413";
|
|
|
|
sha256 = "193amdwgxkb1zp7pgr72fvrdhcg3ly72qpixfxxm85rzz8g2kr77";
|
2017-08-26 22:23:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2020-11-28 08:54:45 +00:00
|
|
|
./hufftable-uint_max.patch
|
2017-08-26 22:23:31 +00:00
|
|
|
];
|
|
|
|
|
2020-11-28 08:54:45 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ];
|
2017-08-26 22:23:31 +00:00
|
|
|
|
2018-01-20 21:57:44 +00:00
|
|
|
buildInputs = [ SDL2 ]
|
2021-01-21 17:00:13 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.libobjc;
|
2017-08-26 22:23:31 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/smpeg2-config \
|
2020-11-28 08:54:45 +00:00
|
|
|
--prefix PATH ":" "${pkg-config}/bin" \
|
2017-08-26 22:23:31 +00:00
|
|
|
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://icculus.org/smpeg/";
|
2017-08-26 22:23:31 +00:00
|
|
|
description = "SDL2 MPEG Player Library";
|
|
|
|
license = licenses.lgpl2;
|
2018-01-20 15:26:21 +00:00
|
|
|
platforms = platforms.unix;
|
2017-08-26 22:23:31 +00:00
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|