diff options
author | Sophie Tauchert <sophie@999eagle.moe> | 2024-02-19 13:24:48 +0100 |
---|---|---|
committer | Sophie Tauchert <sophie@999eagle.moe> | 2024-02-19 13:24:48 +0100 |
commit | b04abddbaadaf7f8353891636b74c19d4b1ba8e4 (patch) | |
tree | 6279a594ac9c2e8d8028ef209933e02752a61186 /pkgs/servers | |
parent | be6d1e57661c5bceb052642643fc95dc5654d280 (diff) |
invidious: use sri hashes in versions.json
Diffstat (limited to 'pkgs/servers')
-rw-r--r-- | pkgs/servers/invidious/default.nix | 6 | ||||
-rwxr-xr-x | pkgs/servers/invidious/update.sh | 8 | ||||
-rw-r--r-- | pkgs/servers/invidious/versions.json | 4 | ||||
-rw-r--r-- | pkgs/servers/invidious/videojs.nix | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/pkgs/servers/invidious/default.nix b/pkgs/servers/invidious/default.nix index 2913b167a17ad..3f5bb42a48f2a 100644 --- a/pkgs/servers/invidious/default.nix +++ b/pkgs/servers/invidious/default.nix @@ -3,9 +3,9 @@ let # All versions, revisions, and checksums are stored in ./versions.json. # The update process is the following: # * pick the latest commit - # * update .invidious.rev, .invidious.version, and .invidious.sha256 + # * update .invidious.rev, .invidious.version, and .invidious.hash # * prefetch the videojs dependencies with scripts/fetch-player-dependencies.cr - # and update .videojs.sha256 (they are normally fetched during build + # and update .videojs.hash (they are normally fetched during build # but nix's sandboxing does not allow that) # * if shard.lock changed # * recreate shards.nix by running crystal2nix @@ -23,7 +23,7 @@ crystal.buildCrystalPackage rec { owner = "iv-org"; repo = pname; fetchSubmodules = true; - inherit (versions.invidious) rev sha256; + inherit (versions.invidious) rev hash; }; postPatch = diff --git a/pkgs/servers/invidious/update.sh b/pkgs/servers/invidious/update.sh index 1c7bf025dd3a4..82c8186bebc48 100755 --- a/pkgs/servers/invidious/update.sh +++ b/pkgs/servers/invidious/update.sh @@ -52,8 +52,8 @@ fi json_set '.invidious.version' "$new_version" json_set '.invidious.rev' "$new_rev" -new_sha256=$(nix-prefetch -I 'nixpkgs=../../..' "$pkg") -json_set '.invidious.sha256' "$new_sha256" +new_hash=$(nix-prefetch -I 'nixpkgs=../../..' "$pkg") +json_set '.invidious.hash' "$new_hash" commit_msg="$pkg: $old_version -> $new_version" # fetch video.js dependencies @@ -61,8 +61,8 @@ info "Running scripts/fetch-player-dependencies.cr..." git -C "$git_dir" reset --hard "$new_rev" (cd "$git_dir" && crystal run scripts/fetch-player-dependencies.cr -- --minified) rm -f "$git_dir/assets/videojs/.gitignore" -videojs_new_sha256=$(nix-hash --type sha256 --base32 "$git_dir/assets/videojs") -json_set '.videojs.sha256' "$videojs_new_sha256" +videojs_new_hash=$(nix-hash --type sha256 --sri "$git_dir/assets/videojs") +json_set '.videojs.hash' "$videojs_new_hash" if git -C "$git_dir" diff-tree --quiet "${old_rev}..${new_rev}" -- 'shard.lock'; then info "shard.lock did not change since $old_rev." diff --git a/pkgs/servers/invidious/versions.json b/pkgs/servers/invidious/versions.json index 3ef940a876ffa..38a59c02413cb 100644 --- a/pkgs/servers/invidious/versions.json +++ b/pkgs/servers/invidious/versions.json @@ -1,10 +1,10 @@ { "invidious": { "rev": "e8a36985aff1a5b33ddf9abea85dd2c23422c2f7", - "sha256": "sha256-3nU6z1rd1oiNmIz3Ok02xBsT4oNSGX/n+3/WbRVCbhI=", + "hash": "sha256-3nU6z1rd1oiNmIz3Ok02xBsT4oNSGX/n+3/WbRVCbhI=", "version": "0.20.1-unstable-2024-02-18" }, "videojs": { - "sha256": "0zj8fgxdg6jsllaxn795xipa6yxh4yf08hb8x0idyg74q37gfh4c" + "hash": "sha256-jED3zsDkPN8i6GhBBJwnsHujbuwlHdsVpVqa1/pzSH4=" } } diff --git a/pkgs/servers/invidious/videojs.nix b/pkgs/servers/invidious/videojs.nix index 4016f8e1258d1..35ad0b1f06558 100644 --- a/pkgs/servers/invidious/videojs.nix +++ b/pkgs/servers/invidious/videojs.nix @@ -14,5 +14,5 @@ stdenvNoCC.mkDerivation { outputHashAlgo = "sha256"; outputHashMode = "recursive"; - outputHash = versions.videojs.sha256; + outputHash = versions.videojs.hash; } |