0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-25 06:44:38 +03:00
yandex-music-linux/README.md

196 lines
4.3 KiB
Markdown
Raw Permalink Normal View History

2024-02-05 17:12:29 +03:00
# yandex-music-linux
## About
Native YandexMusic client for Linux. Built using repacking of Windows client (Electron app).
## Table of content
- [Screenshots](#screenshots)
- [Installation](#installation)
- [Arch Linux](#arch-linux)
- [Debian/Ubuntu](#debianubuntu)
- [Manual Build](#manual-build)
- [Prerequisites](#prerequisites)
- [Extract app only](#extract-app-only)
- [ASAR archive](#asar-archive)
- [Arch Linux](#arch-linux-1)
- [Debian/Ubuntu](#debianubuntu-1)
- [Run with nix](#run-with-nix)
- [Run with flakes](#run-with-flakes)
- [Run old style](#run-old-style)
- [Install to NixOS](#install-to-nixos)
2024-02-05 17:12:29 +03:00
## Screenshots
![image](https://github.com/cucumber-sp/yandex-music-linux/assets/100789522/ab2f69ee-efc4-4a33-8110-131b4c4ff4de)
![image](https://github.com/cucumber-sp/yandex-music-linux/assets/100789522/de618654-15d1-4103-a323-faa00086d0a2)
## Installation
### Arch Linux
***
#### AUR
2024-02-14 14:07:10 +03:00
You can obtain the latest version of package from `AUR` using one of the [AUR Helpers](https://wiki.archlinux.org/title/AUR_helpers). Then install it with `yandex-music` as package name.
2024-02-05 17:12:29 +03:00
For this example I will use [yay](https://github.com/Jguer/yay)
```bash
2024-02-14 14:07:10 +03:00
yay -S yandex-music
2024-02-05 17:12:29 +03:00
```
#### Binary package file
Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/yandex-music-linux/releases) section.
Then you can install it with the following command
```bash
2024-02-14 14:07:10 +03:00
pacman -U yandex-music-<version>-any.pkg.tar.zst
2024-02-05 17:12:29 +03:00
```
***
### Debian/Ubuntu
***
#### APT
Package is currently unavailable at APT. We're still working on it
#### Binary package file
Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/yandex-music-linux/releases) section.
Then you can install it with the following command
```bash
2024-02-14 14:07:10 +03:00
dpkg -i yandex-music_<version>_<arch>.deb
2024-02-05 17:12:29 +03:00
```
***
## Manual Build
### Prerequisites
That's the list of packages you might need to install to be able to manually build the app. However, you should remember that it might be different for your distro/machine.
```
- nodejs
- npm
- jq
- 7z (p7zip)
- unzip
2024-02-13 13:09:14 +03:00
- python
2024-02-05 17:12:29 +03:00
```
In addition you will need to install [Asar](https://github.com/electron/asar) tool with `npm`. I recommend install it globally with the following command
```bash
2024-02-05 17:12:29 +03:00
npm install -g @electron/asar
```
2024-02-09 15:07:50 +03:00
Last step is to download original client `.exe` file. You can get it yourself or take link to the latest version from `./utility/version_info.json` file.
2024-02-05 17:12:29 +03:00
***
### Extract app only
If you only want to get extracted app project with applied patches, you can use the following command:
```bash
2024-03-02 14:55:37 +03:00
bash repack.sh -x [-o OUTPUT_DIR default=./app] <YM.exe>
2024-02-05 17:12:29 +03:00
```
***
### ASAR archive
`.asar` is archive file that containes all electron app resources and information, but doesn't hold Electron binaries. If you have `.asar` file you can launch app using `electron <app>.asar`. You can build this archive with the following command:
```bash
2024-03-02 14:55:37 +03:00
bash repack.sh [-o OUTPUT_DIR default=./app] <YM.exe>
2024-02-05 17:12:29 +03:00
```
***
### Arch Linux
You can build `pacman` package file manually using `PKGBUILD` file from the this repository. Run following commands in folder with `PKGBUILD` file inside to get `.pkg.tar.zst` package:
```bash
2024-02-05 17:12:29 +03:00
pacman -S electron libpulse
makepkg
```
***
### Debian/Ubuntu
You can build `.deb` binary package using the following command:
```bash
2024-03-02 14:55:37 +03:00
bash build_deb.sh [-a <x64|armv7l|arm64|all> default=x64]
2024-02-05 17:12:29 +03:00
```
***
## Run with nix
2024-02-14 14:07:10 +03:00
The `yandex-music` package has unlicensed license, so you need to have
`allowUnfree` option enabled.
### Run with flakes
Execute next to build and run yandex music directly from github
```bash
nix run github:cucumber-sp/yandex-music-linux
```
### Run old style
2024-02-14 14:07:10 +03:00
Execute next in this repository to build yandex-music package without using
flakes.
```bash
nix-build --expr '(import <nixpkgs> {}).callPackage ./nix {}'
```
### Install to NixOS
1. Add input in your flake.nix
```nix
inputs = {
yandex-music.url = "github:cucumber-sp/yandex-music-linux";
};
```
2. Import module in your `configuration.nix` or `home-manager.nix`
```nix
imports = [
2024-02-29 19:12:15 +03:00
yandex-music.nixosModule
];
```
3. Add package `yandex-music`
For `configuration.nix`:
```nix
environment.systemPackages = with pkgs; [
yandex-music
];
```
For Home Manager:
```nix
home.packages = with pkgs; [
yandex-music
];
```