harmony-music: 1.10.31 -> 1.11.2 and add update script (#382371)

This commit is contained in:
Sandro
2025-02-20 18:27:56 +01:00
committed by GitHub
3 changed files with 367 additions and 210 deletions
+44 -27
View File
@@ -3,25 +3,48 @@
lib,
fetchFromGitHub,
flutter324,
pkg-config,
makeDesktopItem,
libayatana-appindicator,
copyDesktopItems,
mpv,
runCommand,
_experimental-update-script-combinators,
harmony-music,
gitUpdater,
yq,
jdk,
}:
flutter324.buildFlutterApplication rec {
pname = "harmony-music";
version = "1.10.31";
version = "1.11.2";
src = fetchFromGitHub {
owner = "anandnet";
repo = "Harmony-Music";
tag = "v${version}";
hash = "sha256-hHwkBNqYcwYlez3SCdc+I+LKyduHU93LCFaAZqpKIO4=";
hash = "sha256-oLtdQWjBM2gRxBJzO++hoXeyvcALu6R4eA7nswQpuqw=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
just_audio_media_kit = "sha256-cNuKwOAEcFCTfbKhvBvYAdmD5qFeNW16jc3A+6ID3bM=";
sidebar_with_animation = "sha256-Y7dTO4wN7cOmm2mnzQPW/gDYltLr7wMKMXbGtAg8WzY=";
youtube_explode_dart = "sha256-+3j+B+Ea1l/SzR8ZLp0vLYco77hkwn9VKRPvDeHqIeY=";
terminate_restart = "sha256-NiznKbko9f2yWcI62MA2xc/NQgy/31fYqK0COHR1Wpk=";
};
nativeBuildInputs = [
copyDesktopItems
autoPatchelfHook
];
buildInputs = [
libayatana-appindicator
jdk
];
desktopItems = [
(makeDesktopItem {
name = "harmony-music";
@@ -40,36 +63,30 @@ flutter324.buildFlutterApplication rec {
})
];
nativeBuildInputs = [
copyDesktopItems
pkg-config
autoPatchelfHook
];
buildInputs = [
libayatana-appindicator
];
gitHashes = {
device_equalizer = "sha256-fvS611D/0U5yJC5i88JdyVNhJozt8tXPhgkkvHgIDRo=";
just_audio_media_kit = "sha256-cNuKwOAEcFCTfbKhvBvYAdmD5qFeNW16jc3A+6ID3bM=";
player_response = "sha256-4Lc6yelLzYjH3K9rzzHHJ1XDyAyQK1xFGfj/rC7wAkg=";
sdk_int = "sha256-ABlghY7RE/E/1G7xP10LuVSWPxbg4jyfLon8XMv8rYo=";
sidebar_with_animation = "sha256-Y7dTO4wN7cOmm2mnzQPW/gDYltLr7wMKMXbGtAg8WzY=";
};
postInstall = ''
install -Dm644 ./assets/icons/icon.png $out/share/pixmaps/harmony-music.png
install -Dm644 assets/icons/icon.png $out/share/pixmaps/harmony-music.png
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : "$out/app/harmony-music/lib:${
lib.makeLibraryPath [
mpv
]
}"
--prefix LD_LIBRARY_PATH : $out/app/harmony-music/lib:${lib.makeLibraryPath [ mpv ]}
'';
passthru = {
pubspecSource =
runCommand "pubspec.lock.json"
{
buildInputs = [ yq ];
inherit (harmony-music) src;
}
''
cat $src/pubspec.lock | yq > $out
'';
updateScript = _experimental-update-script-combinators.sequence [
(gitUpdater { rev-prefix = "v"; })
(_experimental-update-script-combinators.copyAttrOutputToFile "harmony-music.pubspecSource" ./pubspec.lock.json)
];
};
meta = {
description = "Cross platform App for streaming Music";
homepage = "https://github.com/anandnet/Harmony-Music";
File diff suppressed because it is too large Load Diff
@@ -12,14 +12,15 @@ let
inherit version src;
postPatch = ''
cp ${cargoLock.lockFile} Cargo.lock
cp --no-preserve=mode ${cargoLock.lockFile} Cargo.lock
'';
sourceRoot = "${src.name}/rust";
cargoLock =
{
_1_4_1.lockFile = ./Cargo-1.4.1.lock;
cargoLock.lockFile =
rec {
_1_4_2 = _1_4_1;
_1_4_1 = ./Cargo-1.4.1.lock;
}
.${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
Unsupported version of pub 'audiotags': '${version}'