Unverified Commit 94624fb1 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #188839 from muscaln/tiled-bump

parents 0c0281fc 49c59226
Loading
Loading
Loading
Loading
+53 −7
Original line number Diff line number Diff line
{ 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";