11 , commandLineArgs ? ""
15 pname = "lx-music-desktop";
18 buildUrl = version: arch: "https://github.com/lyswhut/lx-music-desktop/releases/download/v${version}/lx-music-desktop_${version}_${arch}.deb";
21 x86_64-linux = fetchurl {
22 url = buildUrl version "amd64";
23 hash = "sha256-krjC3vAwTMzlWJJIuJmYzFtN/Z/IINnzooUtlONeUM0=";
26 aarch64-linux = fetchurl {
27 url = buildUrl version "arm64";
28 hash = "sha256-734hTi/vgSrLAks+CV1vxrrZfSShnpExlO0JWUc4oUE=";
31 armv7l-linux = fetchurl {
32 url = buildUrl version "armv7l";
33 hash = "sha256-e4Elipw7MzO+3XmmGlZfLDFgSph0by5Xy6FtYCie/38=";
37 host = stdenv.hostPlatform.system;
38 src = srcs.${host} or (throw "Unsupported system: ${host}");
40 runtimeLibs = lib.makeLibraryPath [
46 inherit pname version src;
53 runtimeDependencies = map lib.getLib [
60 mkdir -p $out/bin $out/opt/lx-music-desktop
61 cp -r opt/lx-music-desktop/{resources,locales} $out/opt/lx-music-desktop
62 cp -r usr/share $out/share
64 substituteInPlace $out/share/applications/lx-music-desktop.desktop \
65 --replace-fail "/opt/lx-music-desktop/lx-music-desktop" "$out/bin/lx-music-desktop" \
71 makeWrapper ${electron_30}/bin/electron $out/bin/lx-music-desktop \
72 --add-flags $out/opt/lx-music-desktop/resources/app.asar \
73 --prefix LD_LIBRARY_PATH : "${runtimeLibs}" \
74 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
75 --add-flags ${lib.escapeShellArg commandLineArgs} \
79 description = "Music software based on Electron and Vue";
80 homepage = "https://github.com/lyswhut/lx-music-desktop";
81 changelog = "https://github.com/lyswhut/lx-music-desktop/releases/tag/v${version}";
82 license = licenses.asl20;
83 platforms = [ "x86_64-linux" "aarch64-linux" "armv7l-linux" ];
84 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
85 mainProgram = "lx-music-desktop";
86 maintainers = with maintainers; [ oosquare ];