1 { lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, copyDesktopItems, unzip
2 , appimage-run, nix-update-script }:
4 stdenv.mkDerivation (finalAttrs: {
9 url = "https://github.com/deepnight/ldtk/releases/download/v${finalAttrs.version}/ubuntu-distribution.zip";
10 hash = "sha256-i7HIcKs10srfvwihGdMEnnmGoqgFWNJhC6vGf81QJWY=";
13 nativeBuildInputs = [ unzip makeWrapper copyDesktopItems appimage-run ];
15 buildInputs = [ appimage-run ];
21 appimage-run -x src 'LDtk ${finalAttrs.version} installer.AppImage'
29 install -Dm644 'LDtk ${finalAttrs.version} installer.AppImage' $out/share/ldtk.AppImage
30 makeWrapper ${appimage-run}/bin/appimage-run $out/bin/ldtk \
31 --add-flags $out/share/ldtk.AppImage
32 install -Dm644 src/ldtk.png $out/share/icons/hicolor/512x512/apps/ldtk.png
44 comment = "2D level editor";
45 categories = [ "Utility" ];
46 mimeTypes = [ "application/json" ];
50 passthru.updateScript = nix-update-script { };
53 description = "Modern, lightweight and efficient 2D level editor";
54 homepage = "https://ldtk.io/";
55 changelog = "https://github.com/deepnight/ldtk/releases/tag/v${finalAttrs.version}";
56 license = licenses.mit;
57 platforms = [ "x86_64-linux" ];
58 maintainers = with maintainers; [ felschr ];
59 sourceProvenance = with sourceTypes; [ binaryBytecode ];