{lib, fetchFromGitHub, python3, python3Packages, stdenv, ffmpeg-full, libaom }: let pythonEnv = python3.withPackages (pythonPackages: [ pythonPackages.tqdm pythonPackages.psutil ]); in stdenv.mkDerivation rec { pname = "av1an"; version = "1.6"; src = ./Av1an; # fetchFromGitHub { # owner = "master-of-zen"; # repo = "AV1an"; # rev = "${version}"; # sha256 = "19xm24vgfqis0bqrg5fc5jxf5yr1md5y49kb7q3792gihykl6yz3"; # }; buildInputs = [ pythonEnv ffmpeg-full libaom ]; 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; }