archon-lite: use finalAttrs pattern

This commit is contained in:
sophiebsw
2026-07-25 22:37:58 -07:00
parent b0c16e3023
commit fa5d765aee
+8 -11
View File
@@ -4,26 +4,23 @@
fetchurl,
nix-update-script,
}:
let
appimageTools.wrapType2 (finalAttrs: {
pname = "archon-lite";
version = "9.4.36";
src = fetchurl {
url = "https://github.com/RPGLogs/Uploaders-archon-lite/releases/download/v${version}/archon-lite-v${version}.AppImage";
url = "https://github.com/RPGLogs/Uploaders-archon-lite/releases/download/v${finalAttrs.version}/archon-lite-v${finalAttrs.version}.AppImage";
hash = "sha256-th48nSDIi2iugtiqjgkI7/QZtBq+BRQjRs1pKweDArI=";
};
extracted = appimageTools.extractType2 { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons/hicolor/512x512/apps
cp -r ${extracted}/usr/share/icons/hicolor/512x512/apps/'Archon App Lite.png' $out/share/icons/hicolor/512x512/apps/archon-lite.png
cp -r ${finalAttrs.contents}/usr/share/icons/hicolor/512x512/apps/'Archon App Lite.png' $out/share/icons/hicolor/512x512/apps/archon-lite.png
chmod -R +w $out/share/
test ! -e $out/share/icons/hicolor/0x0 # check for regression of https://github.com/electron-userland/electron-builder/issues/5294
cp ${extracted}/'Archon App Lite.desktop' $out/share/applications/archon-lite.desktop
cp ${finalAttrs.contents}/'Archon App Lite.desktop' $out/share/applications/archon-lite.desktop
substituteInPlace $out/share/applications/archon-lite.desktop \
--replace-fail "Exec=AppRun --no-sandbox" "Exec=archon-lite" \
--replace-fail "Icon=Archon App Lite" "Icon=archon-lite"
@@ -34,7 +31,7 @@ appimageTools.wrapType2 {
meta = {
description = "Application for uploading MMORPG combat logs";
homepage = "https://www.archon.gg/download";
downloadPage = "https://github.com/RPGLogs/Uploaders-archon-lite/releases/tag/v${version}";
downloadPage = "https://github.com/RPGLogs/Uploaders-archon-lite/releases/tag/v${finalAttrs.version}";
license = lib.licenses.unfree; # no license listed
mainProgram = "archon-lite";
platforms = lib.platforms.linux;
@@ -44,4 +41,4 @@ appimageTools.wrapType2 {
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}
})