From 49c5922675469bcd8b2c5aa457a806b4b1fd384b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= Date: Mon, 29 Aug 2022 21:31:32 +0300 Subject: [PATCH] tiled: 1.8.4 > 1.9.2 --- pkgs/applications/editors/tiled/default.nix | 60 ++++++++++++++++++--- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/editors/tiled/default.nix b/pkgs/applications/editors/tiled/default.nix index 7be6d4897109..03c6d19b80c4 100644 --- a/pkgs/applications/editors/tiled/default.nix +++ b/pkgs/applications/editors/tiled/default.nix @@ -1,19 +1,65 @@ -{ lib, mkDerivation, fetchFromGitHub, pkg-config, qmake -, python3, qtbase, qttools }: +{ lib +, stdenv +, env +, fetchFromGitHub +, pkg-config +, qbs +, wrapQtAppsHook +, qtbase +, qtdeclarative +, qttools +, qtsvg +, zlib +, libGL +}: -mkDerivation rec { +let + qtEnv = env "tiled-qt-env" [ qtbase qtdeclarative qtsvg qttools ]; +in + +stdenv.mkDerivation rec { pname = "tiled"; - version = "1.8.4"; + version = "1.9.2"; src = fetchFromGitHub { owner = "bjorn"; repo = pname; rev = "v${version}"; - sha256 = "sha256-QYA2krbwH807BkzVST+/+sjSR6So/aGY/YenEjYxE48="; + sha256 = "sha256-026OO7r8n1BUapUtKRHvqKdSZiClTQIiYfajiC2TAcQ="; }; - nativeBuildInputs = [ pkg-config qmake ]; - buildInputs = [ python3 qtbase qttools ]; + nativeBuildInputs = [ pkg-config qbs wrapQtAppsHook ]; + buildInputs = [ qtEnv zlib libGL ]; + + outputs = [ "out" "dev" ]; + + strictDeps = true; + + configurePhase = '' + runHook preConfigure + + qbs setup-qt --settings-dir . ${qtEnv}/bin/qmake qtenv + qbs config --settings-dir . defaultProfile qtenv + qbs resolve --settings-dir . config:release qbs.installPrefix:/ projects.Tiled.installHeaders:true + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + qbs build --settings-dir . config:release + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + qbs install --settings-dir . --install-root $out config:release + + runHook postInstall + ''; meta = with lib; { description = "Free, easy to use and flexible tile map editor";