NUR/pkgs/av1an/default.nix

37 lines
931 B
Nix
Raw Normal View History

2020-03-03 12:22:05 +01:00
{lib, fetchFromGitHub, python3, python3Packages, stdenv, ffmpeg-full, libaom }:
2020-03-02 22:58:24 +01:00
let
2020-03-03 12:22:05 +01:00
pythonEnv = python3.withPackages (pythonPackages: [
2020-03-02 22:58:24 +01:00
pythonPackages.tqdm
pythonPackages.psutil
]);
in
2020-03-03 12:22:05 +01:00
stdenv.mkDerivation rec {
2020-03-02 22:58:24 +01:00
pname = "av1an";
version = "1.6";
2020-03-03 12:22:05 +01:00
src = ./Av1an;
# fetchFromGitHub {
# owner = "master-of-zen";
# repo = "AV1an";
# rev = "${version}";
# sha256 = "19xm24vgfqis0bqrg5fc5jxf5yr1md5y49kb7q3792gihykl6yz3";
# };
2020-03-02 22:58:24 +01:00
buildInputs = [ pythonEnv ffmpeg-full libaom ];
2020-03-03 12:22:05 +01:00
installPhase = ''
mkdir -p $out/bin
sed "s!self.FFMPEG = 'ffmpeg -y -hide_banner -loglevel error'!self.FFMPEG = '${ffmpeg-full}/bin/ffmpeg -y -hide_banner -loglevel error'!g" ./av1an.py > $out/bin/av1an
sed -i "s!self.AOMENC_BINARY = 'aomenc'!self.AOMENC_BINARY = '${libaom}/bin/aomenc'!g" $out/bin/av1an
chmod +x $out/bin/av1an
'';
meta.broken = false;
2020-03-02 22:58:24 +01:00
}