36 lines
1.1 KiB
Nix
36 lines
1.1 KiB
Nix
|
{ lib, fetchurl, appimageTools, }:
|
||
|
|
||
|
let
|
||
|
pname = "ytmdesktop";
|
||
|
version = "1.14.1";
|
||
|
name = "${pname}-${version}";
|
||
|
|
||
|
src = fetchurl {
|
||
|
url = "https://github.com/ytmdesktop/ytmdesktop/releases/download/${version}/YouTube.Music.Desktop.App-${version}_Nightly.AppImage";
|
||
|
sha256 = "sha256-1PcNYfQYYFKMwg+Z2YvsXuoZRxWSE1G8zO/5oF09Ddw=";
|
||
|
};
|
||
|
|
||
|
appimageContents = appimageTools.extract { inherit name src; };
|
||
|
in appimageTools.wrapType2 rec {
|
||
|
inherit name src;
|
||
|
|
||
|
extraInstallCommands = ''
|
||
|
mv $out/bin/{${name},${pname}}
|
||
|
install -m 444 \
|
||
|
-D ${appimageContents}/youtube-music-desktop-app.desktop \
|
||
|
-t $out/share/applications
|
||
|
substituteInPlace \
|
||
|
$out/share/applications/youtube-music-desktop-app.desktop \
|
||
|
--replace 'Exec=AppRun' 'Exec=${pname}'
|
||
|
cp -r ${appimageContents}/usr/share/icons $out/share
|
||
|
'';
|
||
|
|
||
|
meta = with lib; {
|
||
|
description = "A Desktop App for YouTube Music";
|
||
|
homepage = "https://ytmdesktop.app/";
|
||
|
license = licenses.cc0;
|
||
|
platforms = platforms.linux;
|
||
|
maintainers = with maintainers; [ lgcl seanomik ];
|
||
|
};
|
||
|
}
|