{ rustPlatform, fetchFromGitHub, nasm, withWebP ? true, withAVIF ? true, }: let meta = builtins.fromJSON (builtins.readFile ../../meta.json); rev = meta.proxy.rev; in rustPlatform.buildRustPackage rec { pname = "piped-proxy"; version = "latest-${rev}"; src = fetchFromGitHub { owner = "TeamPiped"; repo = "piped-proxy"; inherit rev; sha256 = "${meta.proxy.sha256}"; }; buildNoDefaultFeatures = true; buildFeatures = [] ++ ( if withAVIF then ["avif"] else [] ) ++ ( if withWebP then ["webp"] else [] ); nativeBuildInputs = if withAVIF then [nasm] else []; cargoLock = {lockFile = "${src}/Cargo.lock";}; doCheck = false; }