2022-08-29 18:31:32 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, env
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, qbs
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, qtbase
|
|
|
|
, qtdeclarative
|
|
|
|
, qttools
|
|
|
|
, qtsvg
|
|
|
|
, zlib
|
|
|
|
, libGL
|
|
|
|
}:
|
2015-06-24 09:12:07 +00:00
|
|
|
|
2022-08-29 18:31:32 +00:00
|
|
|
let
|
|
|
|
qtEnv = env "tiled-qt-env" [ qtbase qtdeclarative qtsvg qttools ];
|
|
|
|
in
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-13 23:41:25 +00:00
|
|
|
pname = "tiled";
|
2023-03-16 18:29:33 +00:00
|
|
|
version = "1.10.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}";
|
2023-03-16 18:29:33 +00:00
|
|
|
sha256 = "sha256-y79trmkRrkOOP6p9VMjo/11IE22J3YJtnerBsVP9134=";
|
2013-08-14 01:23:15 +00:00
|
|
|
};
|
|
|
|
|
2022-08-29 18:31:32 +00:00
|
|
|
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
|
|
|
|
'';
|
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
|
|
|
|
];
|
2018-02-02 08:09:53 +00:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2016-04-22 23:29:34 +00:00
|
|
|
platforms = platforms.linux;
|
2013-08-14 01:23:15 +00:00
|
|
|
};
|
|
|
|
}
|