update/navibeat
 1{
 2  lib,
 3  fetchFromGitHub,
 4  flutter341,
 5  pkg-config,
 6  alsa-lib,
 7  libnotify,
 8  mpv-unwrapped,
 9  copyDesktopItems,
10  makeDesktopItem,
11}:
12flutter341.buildFlutterApplication rec {
13  pname = "musly-player";
14  version = "2.0.2";
15
16  passthru.updateScript = [(toString ./update.sh)];
17
18  src = fetchFromGitHub {
19    owner = "dddevid";
20    repo = "Musly";
21    tag = "v${version}";
22    hash = "sha256-gVCkeSkeu8CKZijgoj1L7LX5gxguWMbPo/SG8KfFzC0=";
23  };
24
25  pubspecLock = lib.importJSON ./pubspec.lock.json;
26
27  nativeBuildInputs = [
28    copyDesktopItems
29    pkg-config
30  ];
31
32  buildInputs = [
33    alsa-lib
34    libnotify
35  ];
36
37  extraWrapProgramArgs = ''
38    --prefix LD_LIBRARY_PATH : $out/app/musly/lib:${lib.makeLibraryPath [mpv-unwrapped]}
39  '';
40
41  postFixup = ''
42    mv "$out/bin/musly" "$out/bin/${pname}"
43  '';
44
45  desktopItems = [
46    (makeDesktopItem {
47      name = "Musly";
48      exec = pname;
49      icon = "${src}/assets/logo.png";
50      genericName = "Music Player";
51      desktopName = "Musly";
52      categories = ["AudioVideo" "Audio" "Player" "Music"];
53    })
54  ];
55
56  meta = {
57    description = "A beautiful Flutter music streaming client for Subsonic-compatible servers with a modern Apple Music-inspired UI.";
58    homepage = "https://github.com/dddevid/Musly";
59    licence = lib.licenses.cc-by-nc-sa-40;
60    platforms = ["x86_64-linux"];
61  };
62}