My Nix Configuration
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

[pkgs] bgutil-pot-server: init at 0.6.0

dish 156b101c e2412dc8

+120
+26
packages/bgutil-pot-server/librusty_v8.nix
··· 1 + # COPIED FROM nixpkgs/pkgs/by-name/router 2 + { 3 + lib, 4 + stdenv, 5 + fetchurl, 6 + }: 7 + 8 + let 9 + fetch_librusty_v8 = 10 + args: 11 + fetchurl { 12 + name = "librusty_v8-${args.version}"; 13 + url = "https://github.com/denoland/rusty_v8/releases/download/v${args.version}/librusty_v8_release_${stdenv.hostPlatform.rust.rustcTarget}.a"; 14 + sha256 = args.shas.${stdenv.hostPlatform.system}; 15 + meta = { 16 + inherit (args) version; 17 + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 18 + }; 19 + }; 20 + in 21 + fetch_librusty_v8 { 22 + version = "130.0.7"; 23 + shas = { 24 + x86_64-linux = "sha256-pkdsuU6bAkcIHEZUJOt5PXdzK424CEgTLXjLtQ80t10="; 25 + }; 26 + }
+49
packages/bgutil-pot-server/package.nix
··· 1 + { 2 + lib, 3 + callPackage, 4 + rustPlatform, 5 + fetchFromGitHub, 6 + pkg-config, 7 + openssl, 8 + _experimental-update-script-combinators, 9 + nix-update-script, 10 + }: 11 + rustPlatform.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 + })
+45
packages/bgutil-pot-server/update-librusty.sh
··· 1 + #!/usr/bin/env nix-shell 2 + #!nix-shell -i bash -p gnugrep gnused nix jq 3 + # shellcheck shell=bash 4 + # COPIED FROM nixpkgs/pkgs/by-name/wi/windmill 5 + 6 + set -eu -o pipefail 7 + 8 + echo "librusty_v8: UPDATING" 9 + 10 + BGUTIL_LATEST_VERSION=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://api.github.com/repos/jim60105/bgutil-ytdlp-pot-provider-rs/releases/latest" | jq --raw-output .tag_name) 11 + CARGO_LOCK=$(curl ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} --silent --fail --location "https://github.com/jim60105/bgutil-ytdlp-pot-provider-rs/raw/$BGUTIL_LATEST_VERSION/Cargo.lock") 12 + 13 + PACKAGE_DIR=$(dirname "$(readlink --canonicalize-existing "${BASH_SOURCE[0]}")") 14 + OUTPUT_FILE="$PACKAGE_DIR/librusty_v8.nix" 15 + NEW_VERSION=$(echo "$CARGO_LOCK" | grep --after-context 5 'name = "v8"' | grep 'version =' | sed -E 's/version = "//;s/"//') 16 + 17 + CURRENT_VERSION="" 18 + if [ -f "$OUTPUT_FILE" ]; then 19 + CURRENT_VERSION="$(grep 'version =' "$OUTPUT_FILE" | sed -E 's/version = "//;s/"//')" 20 + fi 21 + 22 + if [ "$CURRENT_VERSION" == "$NEW_VERSION" ]; then 23 + echo "No update needed, $CURRENT_VERSION is already latest" 24 + exit 0 25 + fi 26 + 27 + x86Hash="$(nix-prefetch-url --type sha256 https://github.com/denoland/rusty_v8/releases/download/v"$NEW_V")" 28 + TEMP_FILE="$OUTPUT_FILE.tmp" 29 + cat >"$TEMP_FILE" <<EOF 30 + # COPIED FROM nixpkgs/pkgs/by-name/wi/windmill 31 + # auto-generated file -- DO NOT EDIT! 32 + { fetchLibrustyV8 }: 33 + 34 + fetchLibrustyV8 { 35 + version = "$NEW_VERSION"; 36 + shas = { 37 + # NOTE; Follows supported platforms of package (see meta.platforms attribute)! 38 + x86_64-linux = "$(nix hash convert --hash-algo sha256 --from nix32 "$x86Hash")"; 39 + }; 40 + } 41 + EOF 42 + 43 + mv "$TEMP_FILE" "$OUTPUT_FILE" 44 + 45 + echo "librusty_v8: UPDATE DONE"