Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,18 @@ build_flatpak_arm64:
@echo "Build Flatpak package"
@$(PACKAGE_MANAGER) $(PACKAGE_MANAGER_SUBDIR_ARG) $(APP_DIR) run build-flatpak-arm64

build_nix_x64:
@echo "Build Nix package"
@uname -m | grep -Eq 'x86_64|amd64' || { echo "The x64 Nix target requires a native x86_64 host."; exit 1; }
@$(PACKAGE_MANAGER) $(PACKAGE_MANAGER_SUBDIR_ARG) $(APP_DIR) run prepare-nix -- --x64
@nix-build -A deezer-desktop --argstr pkgVer "$(PKGVER)" --argstr arch "x64" --out-link ./artifacts/x64/nix-result

build_nix_arm64:
@echo "Build Nix package"
@uname -m | grep -Eq 'arm64|aarch64' || { echo "The arm64 Nix target requires a native arm64 host."; exit 1; }
@$(PACKAGE_MANAGER) $(PACKAGE_MANAGER_SUBDIR_ARG) $(APP_DIR) run prepare-nix -- --arm64
@nix-build -A deezer-desktop --argstr pkgVer "$(PKGVER)" --argstr arch "arm64" --out-link ./artifacts/arm64/nix-result

#! DEV

patch-new: install_deps
Expand Down
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ It packages the app in a number of formats:
- Flatpak, [available on flathub](https://flathub.org/apps/dev.aunetx.deezer)
- AppImage
- Snapcraft
- Nix [available on NixOS Nixpkgs](https://search.nixos.org/packages?query=deezer-desktop&show=deezer-desktop)
- `rpm` (Fedora, Red Hat, CentOS, openSUSE, ...)
- `deb` (Debian, Ubuntu, Pop!\_OS, elementary OS, ...)
- `tar.xz` to install anywhere else
Expand Down Expand Up @@ -37,14 +38,15 @@ It packages the app in a number of formats:

### Which package should I choose?

| Method | Best for | How to get it |
| ------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Flatpak**\* | Sandboxed, auto-updated, works everywhere | [**Install from Flathub**](https://flathub.org/apps/dev.aunetx.deezer) or `flatpak install flathub dev.aunetx.deezer` |
| **Snap**\* | Ubuntu and Snap-based distros | [**Install from the Snap Store**](https://snapcraft.io/deezer-desktop) or `sudo snap install deezer-desktop` |
| **AppImage** | A single portable file, no installation needed | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **`.deb`** | Debian, Ubuntu, Pop!\_OS, elementary OS… | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **`.rpm`** | Fedora, Red Hat, CentOS, openSUSE… | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **`.tar.xz`** | Any other distro. Set up and run | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| Method | Best for | How to get it |
| ------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flatpak**\* | Sandboxed, auto-updated, works everywhere | [**Install from Flathub**](https://flathub.org/apps/dev.aunetx.deezer) or `flatpak install flathub dev.aunetx.deezer` |
| **Snap**\* | Ubuntu and Snap-based distros | [**Install from the Snap Store**](https://snapcraft.io/deezer-desktop) or `sudo snap install deezer-desktop` |
| **AppImage** | A single portable file, no installation needed | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **Nix** | NixOS and other distros using Nix package manager | Add the [Nix version](https://search.nixos.org/packages?query=deezer-desktop&show=deezer-desktop) available in `unstable` and current releases to your configuration or run it once with `nix-shell -p deezer-desktop --run deezer-desktop` |
| **`.deb`** | Debian, Ubuntu, Pop!\_OS, elementary OS… | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **`.rpm`** | Fedora, Red Hat, CentOS, openSUSE… | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |
| **`.tar.xz`** | Any other distro. Set up and run | [Download from the releases page](https://github.com/aunetx/deezer-linux/releases/latest) |

All packages for every release are listed on the [**releases page**](https://github.com/aunetx/deezer-linux/releases/latest).

Expand All @@ -68,6 +70,7 @@ After installing, launch **Deezer** from your applications menu, or from a termi
| -------------------- | ------------------------------------------------------------------- |
| Flatpak | `flatpak run dev.aunetx.deezer` |
| Snap | `deezer-desktop` |
| Nix | `deezer-desktop` |
| `.deb` / `.rpm` | `deezer-desktop` |
| `.tar.xz` / AppImage | `./deezer-desktop` (from the extracted folder or the AppImage file) |

Expand Down Expand Up @@ -116,6 +119,7 @@ _\*_ This feature does not work on Flatpak because of strict sandboxing.
| tar.xz | ⚠️ | ✅ |
| snap | ✅ | ✅ |
| flatpak | ✅ | ✅ |
| nix | ✅ | ✅ |

✅ Available ; ⚠️ Not tested ; ❌ Not available ; ⛔ Not planned

Expand Down Expand Up @@ -238,6 +242,21 @@ To run it, you can use:
flatpak run dev.aunetx.deezer
```

### Nix

To build the `nix` package, you can use:

```sh
nix-shell # Temporarily install dependencies from shell.nix in a shell
make install_deps
make build_nix_{arch}
```

To run it, you can use:
```sh
./artifacts/{arch}/nix-result/bin/deezer-desktop
```

## Contributing

If you want to contribute to this project, please read the [contribution guidelines](CONTRIBUTING.md) file.
Expand Down
55 changes: 55 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
pkgs ? import <nixpkgs> { config.allowUnfree = true; },
pkgVer ? "local",
arch ? "x64",
lib ? pkgs.lib,
}:

let

src = ./. + "/artifacts/${arch}/linux${lib.optionalString (arch != "x64") "-${arch}"}-unpacked";

deezer-desktop = pkgs.stdenv.mkDerivation (finalAttrs: {
pname = "deezer-desktop";
version = pkgVer;
inherit src;

nativeBuildInputs = [
pkgs.makeWrapper
];

dontUnpack = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -d $out/bin $out/share/deezer-desktop/resources $out/share/applications $out/share/icons/hicolor/scalable/apps

cp $src/resources/dev.aunetx.deezer.desktop $out/share/applications/
substituteInPlace $out/share/applications/dev.aunetx.deezer.desktop \
--replace-fail "run.sh" "deezer-desktop"
cp $src/resources/dev.aunetx.deezer.svg $out/share/icons/hicolor/scalable/apps/
cp -r $src/resources/{app.asar,linux} $out/share/deezer-desktop/resources/

makeWrapper "${pkgs.lib.getExe pkgs.electron}" "$out/bin/deezer-desktop" \
--inherit-argv0 \
--add-flags "$out/share/deezer-desktop/resources/app.asar" \
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
--set DZ_RESOURCES_PATH "$out/share/deezer-desktop/resources"

runHook postInstall
'';

meta = {
description = "Unofficial Linux port of the music streaming application";
homepage = "https://github.com/aunetx/deezer-linux";
downloadPage = "https://github.com/aunetx/deezer-linux/releases";
platforms = lib.platforms.linux;
license = lib.licenses.unfree;
mainProgram = "deezer-desktop";
};
});
in
{
"deezer-desktop" = deezer-desktop;
default = deezer-desktop;
}
1 change: 1 addition & 0 deletions package-append.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"copy-resources": "mkdir -p resources/linux && cp ../extra/linux/* ./resources/linux",
"start": "yarn run copy-resources && electron .",
"prepare-flatpak": "electron-builder --linux --dir",
"prepare-nix": "electron-builder --linux --dir",

"build-flatpak-x64": "env DEBUG='@malept/flatpak-bundler' electron-builder --x64 --linux flatpak",
"build-flatpak-arm64": "env DEBUG='@malept/flatpak-bundler' electron-builder --arm64 --linux flatpak",
Expand Down
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
pkgs ? import <nixpkgs> { },
}:

pkgs.mkShell {
buildInputs = with pkgs; [
gnumake
p7zip
nodejs
jq
wget
];
}
Loading