From 93aa4063db201efba0e23c463db17bf9dff10508 Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Wed, 8 Jul 2020 23:59:08 +0200 Subject: [PATCH] grav1 --- pkgs/grav1/default.nix | 43 ++++++++++++++++++++++ pkgs/python-modules/wsgiserver/default.nix | 21 +++++++++++ 2 files changed, 64 insertions(+) create mode 100644 pkgs/grav1/default.nix create mode 100644 pkgs/python-modules/wsgiserver/default.nix diff --git a/pkgs/grav1/default.nix b/pkgs/grav1/default.nix new file mode 100644 index 0000000..5749cf4 --- /dev/null +++ b/pkgs/grav1/default.nix @@ -0,0 +1,43 @@ +{ 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"; + version = "0.0.0-20200708"; + + src = fetchFromGitHub { + owner = "wwww-wwww"; + repo = "grav1"; + rev = "975e16d7fedc2d4f012c694cb5b1b0876c3cac01"; + sha256 = "11vingnczwy7wxrzp0hqij0jwwzbwjjd8l35wk2zps28npazaly3"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ pythonEnv ]; + + installPhase = '' + mkdir -p $out/bin + cp server.py $out/bin/server + cp logger.py $out/bin/logger.py + cp project.py $out/bin/project.py + cp split.py $out/bin/split.py + cp util.py $out/bin/util.py + cp mkv_keyframes.py $out/bin/mkv_keyframes.py + cp aom_keyframes.py $out/bin/aom_keyframes.py + cp actions.py $out/bin/actions.py + chmod +x $out/bin/server + + wrapProgram $out/bin/server \ + --prefix PATH : ${lib.makeBinPath [ ffmpeg libaom libvpx dav1d ]} + ''; + +} diff --git a/pkgs/python-modules/wsgiserver/default.nix b/pkgs/python-modules/wsgiserver/default.nix new file mode 100644 index 0000000..c0e772a --- /dev/null +++ b/pkgs/python-modules/wsgiserver/default.nix @@ -0,0 +1,21 @@ +{ lib, buildPythonPackage, fetchPypi }: + +buildPythonPackage rec { + pname = "WSGIserver"; + version = "1.3"; + + src = fetchPypi { + inherit pname version; + sha256 = "03jzmilzxlpilhijd63rc1rnlp6x8xsdnsjmlxc269i0p9g1880j"; + }; + + + doCheck = false; + + meta = with lib; { + homepage = "https://f.gallai.re/wsgiserver"; + description = "High-speed, production ready, thread pooled, generic WSGI server with SSL support"; + license = licenses.lgpl3Plus; + }; + +}