0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-24 14:34:39 +03:00
yandex-music-linux/nix/default.nix
Yury Shvedov b182181f25 [nix] Fix building after licence removing
Change-Id: Ifd53a9fc08095109c134061595b5da97ae5fbd58
2024-01-25 08:05:24 +03:00

49 lines
1.1 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ fetchurl
, runCommand
, writeShellApplication
, makeDesktopItem
, symlinkJoin
, p7zip
, asar
, electron
, jq
, ymExe
}:
let
app = runCommand "yandex-music-app"
{
nativeBuildInputs = [ p7zip asar jq ];
repack = ./../repack.sh;
src = ymExe;
} ''
bash "$repack" -x "$src"
mv ./app "$out"
'';
launcher = writeShellApplication {
name = "yandex-music";
runtimeInputs = [ electron ];
text = ''
electron ${app} "$@"
'';
};
desktopItem = makeDesktopItem {
name = "yandex-music";
desktopName = "Yandex Music";
comment = "Yandex Music - we collect music for you";
exec = "${launcher}/bin/yandex-music";
terminal = false;
icon = "${app}/build/next-desktop/favicon.svg";
categories = [ "Audio" "Music" "Player" "AudioVideo" ];
extraConfig = {
"Name[ru]" = "Яндекс Музыка";
"Comment[ru]" = "Яндекс Музыка собираем музыку для вас";
};
};
in
symlinkJoin {
name = "yandex-music";
paths = [ launcher desktopItem ];
}