depot/pkgs/by-name/mu/muffon/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

42 lines
1.4 KiB
Nix

{
lib,
fetchurl,
appimageTools,
makeWrapper,
}:
let
pname = "muffon";
version = "2.1.0";
src = fetchurl {
url = "https://github.com/staniel359/muffon/releases/download/v${version}/muffon-${version}-linux-x86_64.AppImage";
hash = "sha256-GT91MLjBWsbk9P5fsIxlYUNziAPsdvMSPq9bLL3rKDw=";
};
appimageContents = appimageTools.extractType2 { inherit pname src version; };
in
appimageTools.wrapType2 {
inherit pname src version;
nativeBuildInputs = [ makeWrapper ];
extraInstallCommands = ''
wrapProgram $out/bin/muffon \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
install -m 444 -D ${appimageContents}/muffon.desktop -t $out/share/applications
substituteInPlace $out/share/applications/muffon.desktop \
--replace-fail 'Exec=AppRun' 'Exec=muffon'
install -m 444 -D ${appimageContents}/muffon.png \
$out/share/icons/hicolor/512x512/apps/muffon.png
'';
meta = {
description = "Advanced multi-source music streaming client";
homepage = "https://muffon.netlify.app/";
changelog = "https://github.com/staniel359/muffon/releases/tag/v${version}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ octodi ];
mainProgram = "muffon";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ];
};
}