nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 42 lines 1.5 kB view raw
1{ 2 lib, 3 fetchurl, 4 appimageTools, 5 makeWrapper, 6}: 7 8let 9 pname = "muffon"; 10 version = "2.2.0"; 11 src = fetchurl { 12 url = "https://github.com/staniel359/muffon/releases/download/v${version}/muffon-${version}-linux-x86_64.AppImage"; 13 hash = "sha256-VzT/jlNmUYFmUUqi8EzE4ilawezqhSgXHz32+S3FMTo="; 14 }; 15 appimageContents = appimageTools.extractType2 { inherit pname src version; }; 16in 17appimageTools.wrapType2 { 18 inherit pname src version; 19 20 nativeBuildInputs = [ makeWrapper ]; 21 22 extraInstallCommands = '' 23 wrapProgram $out/bin/muffon \ 24 --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" 25 install -m 444 -D ${appimageContents}/muffon.desktop -t $out/share/applications 26 substituteInPlace $out/share/applications/muffon.desktop \ 27 --replace-fail 'Exec=AppRun' 'Exec=muffon' 28 install -m 444 -D ${appimageContents}/muffon.png \ 29 $out/share/icons/hicolor/512x512/apps/muffon.png 30 ''; 31 32 meta = { 33 description = "Advanced multi-source music streaming client"; 34 homepage = "https://muffon.netlify.app/"; 35 changelog = "https://github.com/staniel359/muffon/releases/tag/v${version}"; 36 license = lib.licenses.agpl3Only; 37 maintainers = with lib.maintainers; [ octodi ]; 38 mainProgram = "muffon"; 39 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 40 platforms = [ "x86_64-linux" ]; 41 }; 42}