tidal-hifi: add updateScript

This commit is contained in:
Gerg-L
2026-02-11 10:10:28 -05:00
parent a97b4614bc
commit d29a858b1b
2 changed files with 34 additions and 6 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ in
name = "castlabs-electron-${version}";
inherit version;
pname = "castlabs-electron";
passthru.dist = final.finalPackage.outPath;
passthru = {
dist = final.finalPackage.outPath;
src = final.finalPackage;
};
meta = {
license = lib.licenses.unfreeRedistributable;
+30 -5
View File
@@ -42,13 +42,16 @@
libsecret,
libpulseaudio,
speechd-minimal,
writeShellScript,
yq,
curl,
nix-update,
common-updater-scripts,
castlabs-electron ? callPackage ./electron.nix { },
}:
let
version = "6.0.1";
electronLibPath = lib.makeLibraryPath [
alsa-lib
at-spi2-atk
@@ -89,12 +92,12 @@ let
in
buildNpmPackage (finalAttrs: {
pname = "tidal-hifi";
inherit version;
version = "6.0.1";
src = fetchFromGitHub {
owner = "Mastermindzh";
repo = "tidal-hifi";
tag = version;
tag = finalAttrs.version;
hash = "sha256-wc8KsZGNjaIG9sijVGEzoJ7ZTmu4xX8b/ETjlMkNyDs=";
};
@@ -187,8 +190,30 @@ buildNpmPackage (finalAttrs: {
"''${gappsWrapperArgs[@]}"
'';
passthru = {
inherit castlabs-electron;
updateScript = writeShellScript "update" ''
set -xeuo pipefail
export PATH="${
lib.makeBinPath [
nix-update
yq
curl
common-updater-scripts
]
}:$PATH"
nix-update 'tidal-hifi'
TIDAL_VERSION="$(nix-instantiate --eval --raw -A 'tidal-hifi.version')"
NEW_VERSION="$(curl --silent "https://raw.githubusercontent.com/Mastermindzh/tidal-hifi/refs/tags/$TIDAL_VERSION/build/electron-builder.base.yml" | yq -r '.electronVersion')"
NIXPKGS_ALLOW_UNFREE=1 update-source-version tidal-hifi.castlabs-electron "$NEW_VERSION"
'';
};
meta = {
changelog = "https://github.com/Mastermindzh/tidal-hifi/releases/tag/${version}";
changelog = "https://github.com/Mastermindzh/tidal-hifi/releases/tag/${finalAttrs.version}";
description = "Web version of Tidal running in Electron with Hi-Fi support thanks to Widevine";
homepage = "https://github.com/Mastermindzh/tidal-hifi";
license = lib.licenses.mit;