2021-01-15 06:42:41 +01:00
|
|
|
{ lib, stdenv, fetchurl
|
2017-06-27 00:47:43 +02:00
|
|
|
, raspberrypifw, pcre, boost, freetype, zlib
|
|
|
|
}:
|
2013-03-29 21:53:44 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
ffmpeg = stdenv.mkDerivation rec {
|
|
|
|
name = "ffmpeg-1.1.3";
|
2021-01-15 06:42:41 +01:00
|
|
|
|
2013-03-29 21:53:44 +01:00
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
|
|
|
|
sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
|
|
|
|
};
|
2021-01-15 06:42:41 +01:00
|
|
|
|
2018-05-10 07:38:51 +02:00
|
|
|
configurePlatforms = [];
|
2013-03-29 21:53:44 +01:00
|
|
|
configureFlags = [
|
2018-08-20 20:43:41 +02:00
|
|
|
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
|
2021-01-15 06:42:41 +01:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isAarch32 [
|
2018-05-10 07:38:51 +02:00
|
|
|
# TODO be better with condition
|
2013-03-29 21:53:44 +01:00
|
|
|
"--cpu=arm1176jzf-s"
|
2018-05-10 07:38:51 +02:00
|
|
|
] ++ [
|
2013-03-29 21:53:44 +01:00
|
|
|
"--disable-muxers"
|
|
|
|
"--enable-muxer=spdif"
|
|
|
|
"--enable-muxer=adts"
|
|
|
|
"--disable-encoders"
|
|
|
|
"--enable-encoder=ac3"
|
|
|
|
"--enable-encoder=aac"
|
|
|
|
"--disable-decoder=mpeg_xvmc"
|
|
|
|
"--disable-devices"
|
|
|
|
"--disable-ffprobe"
|
|
|
|
"--disable-ffplay"
|
|
|
|
"--disable-ffserver"
|
|
|
|
"--disable-ffmpeg"
|
|
|
|
"--enable-shared"
|
|
|
|
"--disable-doc"
|
|
|
|
"--enable-postproc"
|
|
|
|
"--enable-gpl"
|
|
|
|
"--enable-protocol=http"
|
|
|
|
"--enable-pthreads"
|
|
|
|
"--disable-runtime-cpudetect"
|
|
|
|
"--enable-pic"
|
|
|
|
"--disable-armv5te"
|
|
|
|
"--disable-neon"
|
|
|
|
"--enable-armv6t2"
|
|
|
|
"--enable-armv6"
|
|
|
|
"--enable-hardcoded-tables"
|
|
|
|
"--disable-runtime-cpudetect"
|
|
|
|
"--disable-debug"
|
2018-08-20 20:43:41 +02:00
|
|
|
"--arch=${stdenv.hostPlatform.parsed.cpu.name}"
|
|
|
|
"--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
|
2021-01-15 06:42:41 +01:00
|
|
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
2018-05-10 07:38:51 +02:00
|
|
|
"--cross-prefix=${stdenv.cc.targetPrefix}"
|
|
|
|
"--enable-cross-compile"
|
2013-03-29 21:53:44 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://www.ffmpeg.org/";
|
2013-03-29 21:53:44 +01:00
|
|
|
description = "A complete, cross-platform solution to record, convert and stream audio and video";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "omxplayer-20130328-fbee325dc2";
|
|
|
|
src = fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://github.com/huceke/omxplayer/tarball/fbee325dc2";
|
2013-03-29 21:53:44 +01:00
|
|
|
name = "${name}.tar.gz";
|
|
|
|
sha256 = "0fkvv8il7ffqxki2gp8cxa5shh6sz9jsy5vv3f4025g4gss6afkg";
|
|
|
|
};
|
|
|
|
patchPhase = ''
|
|
|
|
sed -i 1d Makefile
|
|
|
|
export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/"
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
2014-06-30 14:56:10 +02:00
|
|
|
mkdir -p $out/bin
|
2013-03-29 21:53:44 +01:00
|
|
|
cp omxplayer.bin $out/bin
|
|
|
|
'';
|
2014-09-15 00:53:05 +02:00
|
|
|
buildInputs = [ raspberrypifw ffmpeg pcre boost freetype zlib ];
|
2013-03-29 21:53:44 +01:00
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/huceke/omxplayer";
|
2013-03-29 21:53:44 +01:00
|
|
|
description = "Commandline OMX player for the Raspberry Pi";
|
2021-01-15 06:42:41 +01:00
|
|
|
license = lib.licenses.gpl2Plus;
|
|
|
|
platforms = lib.platforms.arm;
|
2013-03-29 21:53:44 +01:00
|
|
|
};
|
|
|
|
}
|