2022-11-09 19:09:45 +00:00
|
|
|
{ lib, fetchurl, appimageTools, }:
|
|
|
|
|
|
|
|
let
|
|
|
|
pname = "youtube-music";
|
2022-12-10 07:41:04 +00:00
|
|
|
version = "1.18.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";
|
2022-12-10 07:41:04 +00:00
|
|
|
sha256 = "sha256-7U+zyLyXMVVMtRAT5yTEUqS3/qP5Kx/Yuu263VcsbAE=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|