listen1: init at 2.31.0

This commit is contained in:
running-grass 2023-12-21 10:30:46 +08:00
parent f9074e626c
commit 1da7b4223d
No known key found for this signature in database
GPG Key ID: A4096082BF6552F2

View File

@ -0,0 +1,33 @@
{ lib, fetchurl, appimageTools, makeWrapper }:
let
pname = "listen1";
version = "2.31.0";
src = fetchurl {
url = "https://github.com/listen1/listen1_desktop/releases/download/v${version}/listen1_${version}_linux_x86_64.AppImage";
hash = "sha256-nYDKexVzVuwPmv/eK9cB0oASgXEZbrPrzqPu5OHk6NQ=";
};
appimageContents = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname}-${version} $out/bin/${pname}
install -m 444 -D ${appimageContents}/listen1.desktop -t $out/share/applications
substituteInPlace $out/share/applications/listen1.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/512x512/apps/listen1.png \
$out/share/icons/hicolor/512x512/apps/listen1.png
'';
meta = with lib; {
description = "One for all free music in China";
homepage = "http://listen1.github.io/listen1/";
license = licenses.mit;
maintainers = with maintainers; [ running-grass ];
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "Listen1";
};
}