NUR/pkgs/grav1/server.nix

42 lines
998 B
Nix
Raw Permalink Normal View History

2020-07-08 23:59:08 +02:00
{ lib, stdenv, python3, wsgiserver, fetchFromGitHub, ffmpeg, libaom, libvpx, dav1d, setuptools, makeWrapper }:
let
pythonEnv = python3.withPackages (pythonPackages: with pythonPackages; [
flask
flask-cors
wsgiserver
enzyme
requests
setuptools
]);
in
stdenv.mkDerivation {
pname = "grav1";
2020-08-14 16:45:59 +02:00
version = "0.0.0-20200811";
2020-07-08 23:59:08 +02:00
2020-07-11 01:51:45 +02:00
src = fetchFromGitHub {
owner = "wwww-wwww";
2020-08-14 16:45:59 +02:00
fetchSubmodules = true;
2020-07-11 01:51:45 +02:00
repo = "grav1";
2020-08-14 16:45:59 +02:00
rev = "f0e713a399ffb287835a0c5ea31e02cd9babbe34";
sha256 = "00s7w8gx5718zp8d7iqvya1sv9grcca73ciw4hbqkd1pfigg6x8y";
2020-07-11 01:51:45 +02:00
};
2020-07-10 14:32:26 +02:00
2020-07-11 01:51:45 +02:00
# src = ./grav1;
2020-07-08 23:59:08 +02:00
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pythonEnv ];
installPhase = ''
2020-08-14 16:45:59 +02:00
mkdir -p $out/grav1 $out/bin
cp -r * $out/grav1
rm $out/grav1/client.py
ln -s $out/grav1/server.py $out/bin/server
2020-07-08 23:59:08 +02:00
chmod +x $out/bin/server
wrapProgram $out/bin/server \
2020-07-10 14:32:26 +02:00
--prefix PATH : ${lib.makeBinPath [ ffmpeg libaom libvpx (dav1d.override { withTools = true;}) ]}
2020-07-08 23:59:08 +02:00
'';
}