From edd44fb34ee291d4e510f3459cfe5a31ba42435a Mon Sep 17 00:00:00 2001 From: Daniel Olsen Date: Sat, 11 Jul 2020 02:49:07 +0200 Subject: [PATCH] av1master client --- default.nix | 7 +++++-- pkgs/av1master/client.nix | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 pkgs/av1master/client.nix diff --git a/default.nix b/default.nix index 36b22ac..d62b338 100644 --- a/default.nix +++ b/default.nix @@ -23,6 +23,11 @@ in JAVMovieScraper = pkgs.callPackage ./pkgs/JAVMovieScraper { }; vcsi = pkgs.callPackage ./pkgs/vcsi {}; + grav1 = pkgs.callPackage ./pkgs/grav1/server.nix { wsgiserver = wsgiserver; setuptools = pkgs.python3Packages.setuptools; }; + grav1c = pkgs.callPackage ./pkgs/grav1/client.nix { }; + + av1client = pkgs.callPackage ./pkgs/av1master/client.nix { }; + janus = pkgs.libsForQt5.callPackage ./pkgs/JanusVR/client { }; radical-native = pkgs.callPackage ./pkgs/radical-native { }; @@ -31,8 +36,6 @@ in plotbitrate = pkgs.callPackage ./pkgs/plotbitrate { }; mangohud = pkgs.callPackage ./pkgs/MangoHUD { }; - grav1 = pkgs.callPackage ./pkgs/grav1/server.nix { wsgiserver = wsgiserver; setuptools = pkgs.python3Packages.setuptools; }; - grav1c = pkgs.callPackage ./pkgs/grav1/client.nix { }; botamusique = pkgs.callPackage ./pkgs/botamusique { }; diff --git a/pkgs/av1master/client.nix b/pkgs/av1master/client.nix new file mode 100644 index 0000000..c7175f0 --- /dev/null +++ b/pkgs/av1master/client.nix @@ -0,0 +1,38 @@ +{ +lib, stdenv, fetchFromGitLab, makeWrapper, +bash, ffmpeg, libaom, libvmaf, curl, jq, coreutils, +cacert, shipCACerts ? false +}: + +stdenv.mkDerivation { + pname = "av1client"; + version = "0.13.0"; + + src = fetchFromGitLab { + domain = "git.dodsorf.as"; + owner = "dandellion"; + repo = "av1master"; + rev = "ecf32d4045e90a524917eaad202ddb6f249f7d28"; + sha256 = "1wzx4mfhhd309a2gdkmqmnmj47g9ncv40d0ynj1hnpimjsw29510"; + }; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ bash ffmpeg libaom libvmaf curl jq coreutils cacert ]; + + installPhase = '' + mkdir -p $out/bin + cp src/static/client.sh $out/bin/av1client + chmod +x $out/bin/av1client + + ${if shipCACerts == true + then + "sed -i \'s,curl,curl --cacert " + cacert + "/etc/ssl/certs/ca-bundle.crt" + ",\' $out/bin/av1client" + else + "" + } + + wrapProgram $out/bin/av1client \ + --prefix PATH : ${lib.makeBinPath [ffmpeg libaom curl jq coreutils]} + ''; + +}