From e814fd678650077257f5542e3786077a26ffd116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 9 Nov 2021 10:22:15 +0100 Subject: [PATCH] omxplayer: switch to fetchFromGitHub, use postPatch --- pkgs/applications/video/omxplayer/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/video/omxplayer/default.nix b/pkgs/applications/video/omxplayer/default.nix index f24a9914d0f5..e01d0a2f49c7 100644 --- a/pkgs/applications/video/omxplayer/default.nix +++ b/pkgs/applications/video/omxplayer/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, fetchFromGitHub , fetchurl , raspberrypifw , pcre @@ -69,26 +70,31 @@ let in stdenv.mkDerivation rec { pname = "omxplayer"; - version = "20130328-fbee325dc2"; - src = fetchurl { - url = "https://github.com/huceke/omxplayer/tarball/fbee325dc2"; - name = "omxplayer-${version}.tar.gz"; + version = "unstable-2013-03-28"; + + src = fetchFromGitHub { + owner = "huceke"; + repo = "omxplayer"; + rev = "fbee325dc20441138d04d8d2022ad85956302e97"; sha256 = "0fkvv8il7ffqxki2gp8cxa5shh6sz9jsy5vv3f4025g4gss6afkg"; }; - patchPhase = '' + + postPatch = '' sed -i 1d Makefile export INCLUDES="-I${raspberrypifw}/include/interface/vcos/pthreads -I${raspberrypifw}/include/interface/vmcs_host/linux/" ''; + installPhase = '' mkdir -p $out/bin cp omxplayer.bin $out/bin ''; + buildInputs = [ raspberrypifw ffmpeg pcre boost freetype zlib ]; - meta = { + meta = with lib; { homepage = "https://github.com/huceke/omxplayer"; description = "Commandline OMX player for the Raspberry Pi"; - license = lib.licenses.gpl2Plus; - platforms = lib.platforms.arm; + license = licenses.gpl2Plus; + platforms = platforms.arm; }; }