2022-11-09 19:09:45 +00:00
|
|
|
{ lib, fetchurl, appimageTools, }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "youtube-music";
|
2023-01-21 11:00:09 +00:00
|
|
|
version = "1.19.0";
|
2022-11-09 19:09:45 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/th-ch/youtube-music/releases/download/v${version}/YouTube-Music-${version}.AppImage";
|
2023-01-21 11:00:09 +00:00
|
|
|
sha256 = "sha256-o/a+6EKPEcE9waXQK3hxtp7FPqokteoUAt0iOJk8bYw=";
|
2022-11-09 19:09:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
appimageContents = appimageTools.extract { inherit pname version src; };
|
|
|
|
in
|
|
|
|
appimageTools.wrapType2 rec {
|
|
|
|
inherit pname version src;
|
2022-12-01 20:15:46 +00:00
|
|
|
extraPkgs = pkgs: (appimageTools.defaultFhsEnvArgs.multiPkgs pkgs)
|
|
|
|
++ [ pkgs.libappindicator ];
|
2022-11-09 19:09:45 +00:00
|
|
|
|
|
|
|
extraInstallCommands = ''
|
|
|
|
mv $out/bin/{${pname}-${version},${pname}}
|
|
|
|
install -m 444 \
|
|
|
|
-D ${appimageContents}/youtube-music.desktop \
|
|
|
|
-t $out/share/applications
|
|
|
|
substituteInPlace \
|
|
|
|
$out/share/applications/youtube-music.desktop \
|
|
|
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
|
|
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Electron wrapper around YouTube Music";
|
|
|
|
homepage = "https://th-ch.github.io/youtube-music/";
|
|
|
|
license = licenses.mit;
|
2022-12-01 20:15:46 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
2022-11-09 19:09:45 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = [ maintainers.aacebedo ];
|
|
|
|
};
|
|
|
|
}
|