omxplayer: switch to fetchFromGitHub, use postPatch

+14 -8
+14 -8
pkgs/applications/video/omxplayer/default.nix
··· 1 1 { lib 2 2 , stdenv 3 + , fetchFromGitHub 3 4 , fetchurl 4 5 , raspberrypifw 5 6 , pcre ··· 69 70 in 70 71 stdenv.mkDerivation rec { 71 72 pname = "omxplayer"; 72 - version = "20130328-fbee325dc2"; 73 - src = fetchurl { 74 - url = "https://github.com/huceke/omxplayer/tarball/fbee325dc2"; 75 - name = "omxplayer-${version}.tar.gz"; 73 + version = "unstable-2013-03-28"; 74 + 75 + src = fetchFromGitHub { 76 + owner = "huceke"; 77 + repo = "omxplayer"; 78 + rev = "fbee325dc20441138d04d8d2022ad85956302e97"; 76 79 sha256 = "0fkvv8il7ffqxki2gp8cxa5shh6sz9jsy5vv3f4025g4gss6afkg"; 77 80 }; 78 - patchPhase = '' 81 + 82 + postPatch = '' 79 83 sed -i 1d Makefile 80 84 export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/" 81 85 ''; 86 + 82 87 installPhase = '' 83 88 mkdir -p $out/bin 84 89 cp omxplayer.bin $out/bin 85 90 ''; 91 + 86 92 buildInputs = [ raspberrypifw ffmpeg pcre boost freetype zlib ]; 87 93 88 - meta = { 94 + meta = with lib; { 89 95 homepage = "https://github.com/huceke/omxplayer"; 90 96 description = "Commandline OMX player for the Raspberry Pi"; 91 - license = lib.licenses.gpl2Plus; 92 - platforms = lib.platforms.arm; 97 + license = licenses.gpl2Plus; 98 + platforms = platforms.arm; 93 99 }; 94 100 }