2020-07-10 01:51:44 +02:00
|
|
|
{ lib, stdenv, python3, fetchFromGitHub, ffmpeg, libaom, libvpx, dav1d, makeWrapper }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pythonEnv = python3.withPackages (pythonPackages: with pythonPackages; [
|
|
|
|
requests
|
|
|
|
]);
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "grav1c";
|
2020-08-14 16:45:59 +02:00
|
|
|
version = "0.0.0-20200811";
|
2020-07-10 01:51:44 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wwww-wwww";
|
|
|
|
repo = "grav1";
|
2020-08-14 16:45:59 +02:00
|
|
|
rev = "f0e713a399ffb287835a0c5ea31e02cd9babbe34";
|
|
|
|
sha256 = "025jqhdh5ysgca9yj0q1ld0s1y30bzfbb57wgr78wja61ywnqmgy";
|
2020-07-10 01:51:44 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ pythonEnv ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2020-08-14 16:45:59 +02:00
|
|
|
cp client.py $out/bin/grav1c
|
2020-07-10 01:51:44 +02:00
|
|
|
chmod +x $out/bin/grav1c
|
|
|
|
|
|
|
|
wrapProgram $out/bin/grav1c \
|
|
|
|
--prefix PATH : ${lib.makeBinPath [ ffmpeg libaom libvpx (dav1d.override { withTools = true; }) ]}
|
|
|
|
'';
|
|
|
|
|
|
|
|
}
|