summary refs log tree commit diff
path: root/pkgs/applications/graphics/texturepacker/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/graphics/texturepacker/default.nix')
-rw-r--r--pkgs/applications/graphics/texturepacker/default.nix49
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/texturepacker/default.nix b/pkgs/applications/graphics/texturepacker/default.nix
new file mode 100644
index 00000000000..14769c02af0
--- /dev/null
+++ b/pkgs/applications/graphics/texturepacker/default.nix
@@ -0,0 +1,49 @@
+{ lib
+, stdenv
+, fetchurl
+, dpkg
+, autoPatchelfHook
+, wrapQtAppsHook
+, qtbase
+, qtdeclarative
+, qtsvg
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "texturepacker";
+  version = "7.1.0";
+
+  src = fetchurl {
+    url = "https://www.codeandweb.com/download/texturepacker/${finalAttrs.version}/TexturePacker-${finalAttrs.version}.deb";
+    hash = "sha256-9HbmdMPTp6qZCEU/lIZv4HbjKUlEtPVval+y0tiYObc=";
+  };
+
+  nativeBuildInputs = [
+    dpkg
+    autoPatchelfHook
+    wrapQtAppsHook
+  ];
+
+  buildInputs = [
+    qtbase
+    qtdeclarative
+    qtsvg
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib
+    cp usr/lib/texturepacker/{libGrantlee_Templates.so.5,libHQX.so.1.0.0,libPVRTexLib.so} $out/lib
+    cp usr/lib/texturepacker/TexturePacker $out/bin
+    cp -r usr/share $out
+  '';
+
+  meta = {
+    changelog = "https://www.codeandweb.com/texturepacker/download";
+    description = "Sprite sheet creator and game graphics optimizer";
+    homepage = "https://www.codeandweb.com/texturepacker";
+    license = lib.licenses.unfree;
+    mainProgram = "TexturePacker";
+    maintainers = with lib.maintainers; [ tomasajt ];
+    platforms = [ "x86_64-linux" ];
+  };
+})