bilibili: 1.15.2-2: 1.16.1-1
This commit is contained in:
@@ -8,15 +8,16 @@
|
||||
commandLineArgs ? "",
|
||||
}:
|
||||
let
|
||||
version = "1.15.2-2";
|
||||
sources = import ./sources.nix;
|
||||
version = sources.version;
|
||||
srcs = {
|
||||
x86_64-linux = fetchurl {
|
||||
url = "https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_amd64.deb";
|
||||
hash = "sha256-juAhvdeLzjHDs59eS+wwUn3OmnDecC17Vclp0Q0LtJw=";
|
||||
hash = sources.x86_64-hash;
|
||||
};
|
||||
aarch64-linux = fetchurl {
|
||||
url = "https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_arm64.deb";
|
||||
hash = "sha256-8o0MX0Ih07KQ9wE+nonSZaupSOuUVyuoIbdHYmR29mc=";
|
||||
hash = sources.arm64-hash;
|
||||
};
|
||||
};
|
||||
src =
|
||||
@@ -46,6 +47,8 @@ stdenv.mkDerivation {
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = ./update.sh;
|
||||
|
||||
meta = {
|
||||
description = "Electron-based bilibili desktop client";
|
||||
homepage = "https://github.com/msojocs/bilibili-linux";
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
# Generated by ./update.sh - do not update manually!
|
||||
{
|
||||
version = "1.16.1-1";
|
||||
arm64-hash = "sha256-2pdrzOkF3Ni8Cjwrkevv8QmXioGFtNIHkUF/x+NoZIo=";
|
||||
x86_64-hash = "sha256-yAC1CZEOjip80fBbmor4bCOlEtyXMA1R3Hnxvmj56IQ=";
|
||||
}
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix git curl cacert nix-prefetch-git jq
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
cd $(readlink -e $(dirname "${BASH_SOURCE[0]}"))
|
||||
|
||||
payload=$(curl https://api.github.com/repos/msojocs/bilibili-linux/releases/latest)
|
||||
version=$(jq -r .tag_name <<< "$payload" | cut -c 2-)
|
||||
amd64_url=https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_amd64.deb
|
||||
arm64_url=https://github.com/msojocs/bilibili-linux/releases/download/v${version}/io.github.msojocs.bilibili_${version}_arm64.deb
|
||||
|
||||
amd64_hash=$(nix-prefetch-url $amd64_url)
|
||||
arm64_hash=$(nix-prefetch-url $arm64_url)
|
||||
|
||||
# use friendlier hashes
|
||||
amd64_hash=$(nix hash convert --to sri --hash-algo sha256 "$amd64_hash")
|
||||
arm64_hash=$(nix hash convert --to sri --hash-algo sha256 "$arm64_hash")
|
||||
|
||||
cat >sources.nix <<EOF
|
||||
# Generated by ./update.sh - do not update manually!
|
||||
{
|
||||
version = "$version";
|
||||
arm64-hash = "$arm64_hash";
|
||||
x86_64-hash = "$amd64_hash";
|
||||
}
|
||||
EOF
|
||||
Reference in New Issue
Block a user