diff --git a/nixos/tests/invidious.nix b/nixos/tests/invidious.nix index 372b47b56c34..c042b1065c26 100644 --- a/nixos/tests/invidious.nix +++ b/nixos/tests/invidious.nix @@ -20,7 +20,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { }; networking.firewall.allowedTCPPorts = [ config.services.postgresql.settings.port ]; }; - machine = { config, lib, pkgs, ... }: { + machine = { lib, pkgs, ... }: { services.invidious = { enable = true; }; @@ -81,11 +81,11 @@ import ./make-test-python.nix ({ pkgs, ... }: { def activate_specialisation(name: str): - machine.succeed(f"${nodes.machine.config.system.build.toplevel}/specialisation/{name}/bin/switch-to-configuration test >&2") + machine.succeed(f"${nodes.machine.system.build.toplevel}/specialisation/{name}/bin/switch-to-configuration test >&2") - url = "http://localhost:${toString nodes.machine.config.services.invidious.port}" - port = ${toString nodes.machine.config.services.invidious.port} + url = "http://localhost:${toString nodes.machine.services.invidious.port}" + port = ${toString nodes.machine.services.invidious.port} # start postgres vm now postgres_tcp.start() diff --git a/pkgs/servers/invidious/default.nix b/pkgs/servers/invidious/default.nix index 0cd88f4ffa92..a52d431a1ce9 100644 --- a/pkgs/servers/invidious/default.nix +++ b/pkgs/servers/invidious/default.nix @@ -1,7 +1,7 @@ { lib , callPackage , crystal -, fetchFromGitea +, fetchFromGitHub , librsvg , pkg-config , libxml2 @@ -29,8 +29,7 @@ crystal.buildCrystalPackage rec { pname = "invidious"; inherit (versions.invidious) version; - src = fetchFromGitea { - domain = "gitea.invidious.io"; + src = fetchFromGitHub { owner = "iv-org"; repo = "invidious"; fetchSubmodules = true; diff --git a/pkgs/servers/invidious/shards.nix b/pkgs/servers/invidious/shards.nix index 8e38d563be20..97979576efa6 100644 --- a/pkgs/servers/invidious/shards.nix +++ b/pkgs/servers/invidious/shards.nix @@ -1,8 +1,8 @@ { ameba = { url = "https://github.com/crystal-ameba/ameba.git"; - rev = "v1.5.0"; - sha256 = "1idivsbpmi40aqvs82fsv37nrgikirprxrj3ls9chsb876fq9p2d"; + rev = "v1.6.1"; + sha256 = "1qlgqpgycfxvvrfzih7b9ayb6fvkffz5aw0msbj70z2q7wvsq29p"; }; athena-negotiation = { url = "https://github.com/athena-framework/negotiation.git"; diff --git a/pkgs/servers/invidious/update.sh b/pkgs/servers/invidious/update.sh index 2ba5c3452c6c..848a6a9010ea 100755 --- a/pkgs/servers/invidious/update.sh +++ b/pkgs/servers/invidious/update.sh @@ -36,7 +36,7 @@ if [ ! -d "$git_dir" ]; then fi git -C "$git_dir" fetch origin --tags "$git_branch" -new_tag="$(git -C "$git_dir" ls-remote --tags --sort=committerdate origin | head -n1 | grep -Po '(?<=refs/tags/).*')" +new_tag="$(git -C "$git_dir" ls-remote --tags --sort=-committerdate origin | tail -n1 | grep -Po '(?<=refs/tags/).*')" new_version="${new_tag#v}" if [ "$new_version" = "$old_version" ]; then @@ -44,8 +44,9 @@ if [ "$new_version" = "$old_version" ]; then exit fi +info "updating to $new_tag" commit="$(git -C "$git_dir" rev-list "$new_tag" --max-count=1 --abbrev-commit)" -date="$(git -C "$git_dir" log -1 --format=%cd --date=format:%Y.%m.%d)" +date="$(git -C "$git_dir" log -1 --format=%cd --date=format:%Y.%m.%d "$commit")" json_set '.invidious.date' "$date" json_set '.invidious.commit' "$commit" json_set '.invidious.version' "$new_version" diff --git a/pkgs/servers/invidious/versions.json b/pkgs/servers/invidious/versions.json index 35a6f77b84b6..4a4776b17649 100644 --- a/pkgs/servers/invidious/versions.json +++ b/pkgs/servers/invidious/versions.json @@ -1,9 +1,9 @@ { "invidious": { - "hash": "sha256-YZ+uhn1ESuRTZxAMoxKCpxEaUfeCUqOrSr3LkdbrTkU=", - "version": "2.20240427", - "date": "2024.04.27", - "commit": "eda7444c" + "hash": "sha256-oNkEFATRVgPC8Bhp0v04an3LvqgsSEjLZdeblb7n8TI=", + "version": "2.20240825.2", + "date": "2024.08.26", + "commit": "4782a670" }, "videojs": { "hash": "sha256-jED3zsDkPN8i6GhBBJwnsHujbuwlHdsVpVqa1/pzSH4="