2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv
|
2020-12-25 13:55:36 +00:00
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, darwin
|
2022-06-26 10:26:21 +00:00
|
|
|
, fetchFromGitHub
|
2020-12-25 13:55:36 +00:00
|
|
|
, makeWrapper
|
|
|
|
, pkg-config
|
|
|
|
, SDL2
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2020-12-25 13:55:36 +00:00
|
|
|
pname = "smpeg2";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "unstable-2022-05-26";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "icculus";
|
|
|
|
repo = "smpeg";
|
|
|
|
rev = "c5793e5f3f2765fc09c24380d7e92136a0e33d3b";
|
|
|
|
sha256 = "sha256-Z0u83K1GIXd0jUYo5ZyWUH2Zt7Hn8z+yr06DAtAEukw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-12-25 13:55:36 +00:00
|
|
|
nativeBuildInputs = [ autoconf automake makeWrapper pkg-config ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ SDL2 ]
|
2021-02-05 17:12:51 +00:00
|
|
|
++ lib.optional stdenv.isDarwin darwin.libobjc;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
sh autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/smpeg2-config \
|
2020-12-25 13:55:36 +00:00
|
|
|
--prefix PATH ":" "${pkg-config}/bin" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--prefix PKG_CONFIG_PATH ":" "${SDL2.dev}/lib/pkgconfig"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://icculus.org/smpeg/";
|
|
|
|
description = "SDL2 MPEG Player Library";
|
|
|
|
license = licenses.lgpl2;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|