biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / video / omxplayer / default.nix
blobc9c77c1bbcb95c0e1aac35411dfccf4e0dc24a2b
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , fetchurl
5 , raspberrypifw
6 , pcre
7 , boost
8 , freetype
9 , zlib
12 let
13   ffmpeg = stdenv.mkDerivation rec {
14     pname = "ffmpeg";
15     version = "1.1.3";
17     src = fetchurl {
18       url = "http://www.ffmpeg.org/releases/ffmpeg-${version}.tar.bz2";
19       sha256 = "03s1zsprz5p6gjgwwqcf7b6cvzwwid6l8k7bamx9i0f1iwkgdm0j";
20     };
22     configurePlatforms = [ ];
23     configureFlags = [
24       "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
25     ] ++ lib.optionals stdenv.hostPlatform.isAarch32 [
26       # TODO be better with condition
27       "--cpu=arm1176jzf-s"
28     ] ++ [
29       "--disable-muxers"
30       "--enable-muxer=spdif"
31       "--enable-muxer=adts"
32       "--disable-encoders"
33       "--enable-encoder=ac3"
34       "--enable-encoder=aac"
35       "--disable-decoder=mpeg_xvmc"
36       "--disable-devices"
37       "--disable-ffprobe"
38       "--disable-ffplay"
39       "--disable-ffserver"
40       "--disable-ffmpeg"
41       "--enable-shared"
42       "--disable-doc"
43       "--enable-postproc"
44       "--enable-gpl"
45       "--enable-protocol=http"
46       "--enable-pthreads"
47       "--disable-runtime-cpudetect"
48       "--enable-pic"
49       "--disable-armv5te"
50       "--disable-neon"
51       "--enable-armv6t2"
52       "--enable-armv6"
53       "--enable-hardcoded-tables"
54       "--disable-runtime-cpudetect"
55       "--disable-debug"
56       "--arch=${stdenv.hostPlatform.parsed.cpu.name}"
57       "--target_os=${stdenv.hostPlatform.parsed.kernel.name}"
58     ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
59       "--cross-prefix=${stdenv.cc.targetPrefix}"
60       "--enable-cross-compile"
61     ];
63     enableParallelBuilding = true;
65     meta = {
66       homepage = "http://www.ffmpeg.org/";
67       description = "Complete, cross-platform solution to record, convert and stream audio and video";
68     };
69   };
71 stdenv.mkDerivation rec {
72   pname = "omxplayer";
73   version = "unstable-2013-03-28";
75   src = fetchFromGitHub {
76     owner = "huceke";
77     repo = "omxplayer";
78     rev = "fbee325dc20441138d04d8d2022ad85956302e97";
79     sha256 = "0fkvv8il7ffqxki2gp8cxa5shh6sz9jsy5vv3f4025g4gss6afkg";
80   };
82   postPatch = ''
83     sed -i 1d Makefile
84     export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/"
85   '';
87   installPhase = ''
88     mkdir -p $out/bin
89     cp omxplayer.bin $out/bin
90   '';
92   buildInputs = [ raspberrypifw ffmpeg pcre boost freetype zlib ];
94   meta = with lib; {
95     homepage = "https://github.com/huceke/omxplayer";
96     description = "Commandline OMX player for the Raspberry Pi";
97     license = licenses.gpl2Plus;
98     platforms = platforms.arm;
99   };