diff options
author | Sophie Tauchert <sophie@999eagle.moe> | 2024-02-19 11:57:13 +0100 |
---|---|---|
committer | Sophie Tauchert <sophie@999eagle.moe> | 2024-02-19 12:51:16 +0100 |
commit | be6d1e57661c5bceb052642643fc95dc5654d280 (patch) | |
tree | b6e2ce2ac499e61899e42bd290710aee22060f89 | |
parent | 531abe350cb5fccaecb598aa5c63c428167e4f65 (diff) |
invidious: unstable-2024-01-29 -> 0.20.1-unstable-2024-02-18, update update script
-rw-r--r-- | pkgs/servers/invidious/default.nix | 8 | ||||
-rw-r--r-- | pkgs/servers/invidious/shards.nix | 54 | ||||
-rwxr-xr-x | pkgs/servers/invidious/update.sh | 5 | ||||
-rw-r--r-- | pkgs/servers/invidious/versions.json | 6 |
4 files changed, 29 insertions, 44 deletions
diff --git a/pkgs/servers/invidious/default.nix b/pkgs/servers/invidious/default.nix index 42072e266a3aa..2913b167a17ad 100644 --- a/pkgs/servers/invidious/default.nix +++ b/pkgs/servers/invidious/default.nix @@ -45,7 +45,7 @@ crystal.buildCrystalPackage rec { substituteInPlace src/invidious.cr \ --replace ${lib.escapeShellArg branchTemplate} '"master"' \ --replace ${lib.escapeShellArg commitTemplate} '"${lib.substring 0 7 versions.invidious.rev}"' \ - --replace ${lib.escapeShellArg versionTemplate} '"${lib.replaceStrings ["-"] ["."] (lib.substring 9 10 version)}"' \ + --replace ${lib.escapeShellArg versionTemplate} '"${lib.concatStringsSep "." (lib.drop 2 (lib.splitString "-" version))}"' \ --replace ${lib.escapeShellArg assetCommitTemplate} '"${lib.substring 0 7 versions.invidious.rev}"' # Patch the assets and locales paths to be absolute @@ -91,11 +91,13 @@ crystal.buildCrystalPackage rec { # environment variable. Even though the database and hmac_key are # bogus, --help still works. installCheckPhase = '' - INVIDIOUS_CONFIG="$(cat <<EOF + export INVIDIOUS_CONFIG="$(cat <<EOF database_url: sqlite3:///dev/null hmac_key: "this-is-required" EOF - )" $out/bin/invidious --help + )" + $out/bin/invidious --help + $out/bin/invidious --version ''; passthru = { diff --git a/pkgs/servers/invidious/shards.nix b/pkgs/servers/invidious/shards.nix index e5f297d902c0d..8e38d563be204 100644 --- a/pkgs/servers/invidious/shards.nix +++ b/pkgs/servers/invidious/shards.nix @@ -1,80 +1,62 @@ { + ameba = { + url = "https://github.com/crystal-ameba/ameba.git"; + rev = "v1.5.0"; + sha256 = "1idivsbpmi40aqvs82fsv37nrgikirprxrj3ls9chsb876fq9p2d"; + }; athena-negotiation = { - owner = "athena-framework"; - repo = "negotiation"; + url = "https://github.com/athena-framework/negotiation.git"; rev = "v0.1.1"; sha256 = "1vkk59lqrxb0l8kyzs114i3c18zb2bdiah2xhazkk8q7x6fz4yzk"; }; backtracer = { - owner = "sija"; - repo = "backtracer.cr"; + url = "https://github.com/sija/backtracer.cr.git"; rev = "v1.2.1"; sha256 = "02r1l7rn2wsljkx495s5s7j04zgn73m2kx0hkzs7620camvlwbqq"; }; db = { - owner = "crystal-lang"; - repo = "crystal-db"; + url = "https://github.com/crystal-lang/crystal-db.git"; rev = "v0.10.1"; sha256 = "03c5h14z6h2mxnx949lihnyqjd19hcj38iasdwq9fp95h8cld376"; }; exception_page = { - owner = "crystal-loot"; - repo = "exception_page"; + url = "https://github.com/crystal-loot/exception_page.git"; rev = "v0.2.2"; sha256 = "1c8askb9b7621jjz5pjj6b8pdbhw3r1l3dym6swg1saspf5j3jwi"; }; kemal = { - owner = "kemalcr"; - repo = "kemal"; + url = "https://github.com/kemalcr/kemal.git"; rev = "v1.1.2"; sha256 = "1149q4qw0zrws5asqqr4snrdi67xsmisdcq58zcrbgqgsxgly9d0"; }; kilt = { - owner = "jeromegn"; - repo = "kilt"; + url = "https://github.com/jeromegn/kilt.git"; rev = "v0.6.1"; sha256 = "0dpc15y9m8c5l9zdfif6jlf7zmkrlm9w4m2igi5xa22fdjwamwfp"; }; - lsquic = { - owner = "iv-org"; - repo = "lsquic.cr"; - rev = "v2.18.1-2"; - sha256 = "0bljk0pwbjb813dfwrhgi00w2ai09k868xvak4hfzdkbmpc7id6y"; - }; pg = { - owner = "will"; - repo = "crystal-pg"; + url = "https://github.com/will/crystal-pg.git"; rev = "v0.24.0"; sha256 = "07i5bqkv5j6y6f8v5cpqdxc5wzzrvgv3ds24znv4mzv6nc84csn4"; }; protodec = { - owner = "iv-org"; - repo = "protodec"; - rev = "v0.1.4"; - sha256 = "15azh9izxqgwpgkpicmivfdz31wkibnwy09rwhxsg0lyc4wf8xj9"; + url = "https://github.com/iv-org/protodec.git"; + rev = "v0.1.5"; + sha256 = "09cm36skv2mxqrlczp0j1g7cf8wsfdqr8q39nxyj3ggc3yadp8bc"; }; radix = { - owner = "luislavena"; - repo = "radix"; + url = "https://github.com/luislavena/radix.git"; rev = "v0.4.1"; sha256 = "1l08cydkdidq9yyil1wl240hvk41iycv04jrg6nx5mkvzw4z1bzg"; }; spectator = { - owner = "icy-arctic-fox"; - repo = "spectator"; + url = "https://github.com/icy-arctic-fox/spectator.git"; rev = "v0.10.4"; sha256 = "0rcxq2nbslvwrd8m9ajw6dzaw3hagxmkdy9s8p34cgnr4c9dijdq"; }; sqlite3 = { - owner = "crystal-lang"; - repo = "crystal-sqlite3"; + url = "https://github.com/crystal-lang/crystal-sqlite3.git"; rev = "v0.18.0"; sha256 = "03nnvpchhq9f9ywsm3pk2rrj4a3figw7xs96zdziwgr5znkz6x93"; }; - ameba = { - owner = "crystal-ameba"; - repo = "ameba"; - rev = "v0.14.3"; - sha256 = "1cfr95xi6hsyxw1wlrh571hc775xhwmssk3k14i8b7dgbwfmm5x1"; - }; } diff --git a/pkgs/servers/invidious/update.sh b/pkgs/servers/invidious/update.sh index da5265d31a6c0..1c7bf025dd3a4 100755 --- a/pkgs/servers/invidious/update.sh +++ b/pkgs/servers/invidious/update.sh @@ -35,13 +35,14 @@ if [ ! -d "$git_dir" ]; then git init --initial-branch="$git_branch" "$git_dir" git -C "$git_dir" remote add origin "$git_url" fi -git -C "$git_dir" fetch origin "$git_branch" +git -C "$git_dir" fetch origin --tags "$git_branch" # use latest commit before today, we should not call the version *today* # because there might still be commits coming # use the day of the latest commit we picked as version new_rev=$(git -C "$git_dir" log -n 1 --format='format:%H' --before="${today}T00:00:00Z" "origin/$git_branch") -new_version="unstable-$(TZ=UTC git -C "$git_dir" log -n 1 --date='format-local:%Y-%m-%d' --format='%cd' "$new_rev")" +new_tag=$(git -C "$git_dir" describe --tags --abbrev=0 "$new_rev") +new_version="$new_tag-unstable-$(TZ=UTC git -C "$git_dir" log -n 1 --date='format-local:%Y-%m-%d' --format='%cd' "$new_rev")" info "latest commit before $today: $new_rev" if [ "$new_rev" = "$old_rev" ]; then diff --git a/pkgs/servers/invidious/versions.json b/pkgs/servers/invidious/versions.json index ae01aaa011f3c..3ef940a876ffa 100644 --- a/pkgs/servers/invidious/versions.json +++ b/pkgs/servers/invidious/versions.json @@ -1,8 +1,8 @@ { "invidious": { - "rev": "c005ada48723808e507d0a4d5a3363a1c14a4f07", - "sha256": "sha256-KbnBdAAjScwKV4uUzyBXAQx2C7MqCdCM3gSvgNIzKAU=", - "version": "unstable-2024-01-29" + "rev": "e8a36985aff1a5b33ddf9abea85dd2c23422c2f7", + "sha256": "sha256-3nU6z1rd1oiNmIz3Ok02xBsT4oNSGX/n+3/WbRVCbhI=", + "version": "0.20.1-unstable-2024-02-18" }, "videojs": { "sha256": "0zj8fgxdg6jsllaxn795xipa6yxh4yf08hb8x0idyg74q37gfh4c" |