multiviewer-for-f1: modernize
Co-authored-by: Matteo Pacini <m+github@matteopacini.me>
This commit is contained in:
co-authored by
Matteo Pacini
parent
f6b2e84062
commit
9be1cf8d37
@@ -27,13 +27,13 @@
|
||||
let
|
||||
id = "305607196";
|
||||
in
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "multiviewer-for-f1";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://releases.multiviewer.dev/download/${id}/multiviewer_${version}_amd64.deb";
|
||||
sha256 = "sha256-Uc4db2o4XBV9eRNugxS6pA9Z5YhjY5QnEkwOICXmUwc=";
|
||||
url = "https://releases.multiviewer.dev/download/${id}/multiviewer_${finalAttrs.version}_amd64.deb";
|
||||
hash = "sha256-Uc4db2o4XBV9eRNugxS6pA9Z5YhjY5QnEkwOICXmUwc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -105,24 +105,24 @@ stdenvNoCC.mkDerivation rec {
|
||||
id=$(echo $latest | jq -r '.downloads[] | select(.platform=="linux_deb").id')
|
||||
version=$(echo $latest | jq -r '.version')
|
||||
|
||||
if [ "$version" != "${version}" ]
|
||||
if [ "$version" != "${finalAttrs.version}" ]
|
||||
then
|
||||
# Pre-calculate package hash
|
||||
hash=$(nix-prefetch-url --type sha256 $link)
|
||||
|
||||
# Update ID and version in source
|
||||
update-source-version ${pname} "$id" --version-key=id
|
||||
update-source-version ${pname} "$version" "$hash" --system=x86_64-linux
|
||||
update-source-version ${finalAttrs.pname} "$id" --version-key=id
|
||||
update-source-version ${finalAttrs.pname} "$version" "$hash" --system=x86_64-linux
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Unofficial desktop client for F1 TV";
|
||||
homepage = "https://multiviewer.app";
|
||||
downloadPage = "https://multiviewer.app/download";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ babeuh ];
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ babeuh ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "multiviewer";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user