2022-08-29 18:31:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, env
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, qbs
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qttools
|
2024-10-16 14:23:49 +00:00
|
|
|
, qtwayland
|
2022-08-29 18:31:32 +00:00
|
|
|
, qtsvg
|
|
|
|
, zlib
|
2023-04-15 07:49:26 +00:00
|
|
|
, zstd
|
2022-08-29 18:31:32 +00:00
|
|
|
, libGL
|
|
|
|
}:
|
2015-06-24 09:12:07 +00:00
|
|
|
|
2022-08-29 18:31:32 +00:00
|
|
|
let
|
2024-10-16 14:23:49 +00:00
|
|
|
qtEnv = env "tiled-qt-env" [ qtbase qtdeclarative qtsvg qttools qtwayland ];
|
2022-08-29 18:31:32 +00:00
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-13 23:41:25 +00:00
|
|
|
pname = "tiled";
|
2024-06-28 03:00:57 +00:00
|
|
|
version = "1.11.0";
|
2013-08-14 01:23:15 +00:00
|
|
|
|
2017-03-19 23:34:46 +00:00
|
|
|
src = fetchFromGitHub {
|
2023-03-16 18:29:33 +00:00
|
|
|
owner = "mapeditor";
|
2019-03-13 23:41:25 +00:00
|
|
|
repo = pname;
|
2017-03-19 23:34:46 +00:00
|
|
|
rev = "v${version}";
|
2024-06-28 03:00:57 +00:00
|
|
|
sha256 = "sha256-cFS1OSYfGMsnw+VkZD/HO4+D+pxNKuifWjNhy0FoxN0=";
|
2013-08-14 01:23:15 +00:00
|
|
|
};
|
|
|
|
|
2022-08-29 18:31:32 +00:00
|
|
|
nativeBuildInputs = [ pkg-config qbs wrapQtAppsHook ];
|
2023-04-15 07:49:26 +00:00
|
|
|
buildInputs = [ qtEnv zlib zstd libGL ];
|
2022-08-29 18:31:32 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2016-04-22 23:29:34 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2016-04-22 23:29:34 +00:00
|
|
|
description = "Free, easy to use and flexible tile map editor";
|
2020-03-04 12:43:57 +00:00
|
|
|
homepage = "https://www.mapeditor.org/";
|
2016-04-22 23:29:34 +00:00
|
|
|
license = with licenses; [
|
|
|
|
bsd2 # libtiled and tmxviewer
|
|
|
|
gpl2Plus # all the rest
|
|
|
|
];
|
2024-10-24 06:19:50 +00:00
|
|
|
maintainers = with maintainers; [ dywedir ryan4yin ];
|
2016-04-22 23:29:34 +00:00
|
|
|
platforms = platforms.linux;
|
2013-08-14 01:23:15 +00:00
|
|
|
};
|
|
|
|
}
|