mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-09-28 01:29:03 +03:00
nix: add desktop item and fix names
Move default.nix to nix folder Rename yandex_music to yandex-music to be more nix-styled Add generation of yandex-music.desktop file Change-Id: Id0f3bebc22e50ce51be13615ef47717277eb8e3d
This commit is contained in:
48
nix/default.nix
Normal file
48
nix/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{ 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" -xl "$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 ];
|
||||
}
|
Reference in New Issue
Block a user