diff options
author | Felix Schröter <dev@felschr.com> | 2022-06-24 23:03:04 +0200 |
---|---|---|
committer | Felix Schröter <dev@felschr.com> | 2022-06-26 15:30:17 +0200 |
commit | cdecf66640f2bec6f6cb41dea0c06d416bd8a902 (patch) | |
tree | eaa8aba14e10bf775d2f37a78311f7fd8203e181 /pkgs/applications/editors/ldtk | |
parent | a24431e56f3cd4b01db7d71086a782ba29ad87ab (diff) |
ldtk: init at 1.1.3
Diffstat (limited to 'pkgs/applications/editors/ldtk')
-rw-r--r-- | pkgs/applications/editors/ldtk/default.nix | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/pkgs/applications/editors/ldtk/default.nix b/pkgs/applications/editors/ldtk/default.nix new file mode 100644 index 0000000000000..175026440daaa --- /dev/null +++ b/pkgs/applications/editors/ldtk/default.nix @@ -0,0 +1,58 @@ +{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, copyDesktopItems, unzip +, appimage-run }: + +stdenv.mkDerivation rec { + pname = "ldtk"; + version = "1.1.3"; + + src = fetchurl { + url = "https://github.com/deepnight/ldtk/releases/download/v${version}/ubuntu-distribution.zip"; + sha256 = "sha256-qw7+4k4IH2+9DX4ny8EBbSlyXBrk/y91W04+zWPGupk="; + }; + + nativeBuildInputs = [ unzip makeWrapper copyDesktopItems appimage-run ]; + + buildInputs = [ appimage-run ]; + + unpackPhase = '' + runHook preUnpack + + unzip $src + appimage-run -x src 'LDtk ${version} installer.AppImage' + + runHook postUnpack + ''; + + installPhase = '' + runHook preInstall + + install -Dm644 'LDtk ${version} installer.AppImage' $out/share/ldtk.AppImage + makeWrapper ${appimage-run}/bin/appimage-run $out/bin/ldtk \ + --add-flags $out/share/ldtk.AppImage + install -Dm644 src/ldtk.png $out/share/icons/hicolor/1024x1024/apps/ldtk.png + + runHook postInstall + ''; + + desktopItems = [ + (makeDesktopItem { + name = "ldtk"; + exec = "ldtk"; + icon = "ldtk"; + terminal = false; + desktopName = "LDtk"; + comment = "2D level editor"; + categories = [ "Utility" ]; + mimeTypes = [ "application/json" ]; + }) + ]; + + meta = with lib; { + homepage = "https://ldtk.io/"; + description = "Modern, lightweight and efficient 2D level editor"; + license = licenses.mit; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ felschr ]; + sourceProvenance = with sourceTypes; [ binaryBytecode ]; + }; +} |