1{
2 lib,
3 callPackage,
4 rustPlatform,
5 fetchFromGitHub,
6 pkg-config,
7 openssl,
8 _experimental-update-script-combinators,
9 nix-update-script,
10}:
11rustPlatform.buildRustPackage (finalAttrs: {
12 pname = "bgutil-pot-server";
13 version = "0.6.0";
14
15 src = fetchFromGitHub {
16 owner = "jim60105";
17 repo = "bgutil-ytdlp-pot-provider-rs";
18 tag = "v${finalAttrs.version}";
19 hash = "sha256-kEu5WqOymH8yAyMhGKtVPOq3qlTRpFU/FO71uWEX/e8=";
20 };
21
22 cargoHash = "sha256-fJZeyIsFUfpWeC1MWsU1hANb6cqC9xHQOnhcohEMTeM=";
23
24 nativeBuildInputs = [
25 pkg-config
26 ];
27
28 buildInputs = [
29 openssl
30 ];
31
32 env.RUSTY_V8_ARCHIVE = callPackage ./librusty_v8.nix { };
33
34 doCheck = false;
35
36 passthru.updateScript = _experimental-update-script-combinators.sequence [
37 (nix-update-script { })
38 ./update-librusty.sh
39 ];
40
41 meta = {
42 changelog = "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/releases/tag/v${finalAttrs.version}";
43 description = "Proof-of-origin token provider plugin for yt-dlp in Rust";
44 homepage = "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs";
45 license = lib.licenses.gpl3Plus;
46 maintainers = with lib.maintainers; [ pyrox0 ];
47 mainProgram = "bgutil-pot";
48 };
49})