nixpkgs/pkgs/applications/editors/tiled/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

76 lines
1.5 KiB
Nix
Raw Normal View History

2022-08-29 18:31:32 +00:00
{ lib
, stdenv
, env
, fetchFromGitHub
, pkg-config
, qbs
, wrapQtAppsHook
, qtbase
, qtdeclarative
, qttools
, qtsvg
, zlib
2023-04-15 07:49:26 +00:00
, zstd
2022-08-29 18:31:32 +00:00
, libGL
}:
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-08-09 02:01:02 +00:00
version = "1.10.2";
2013-08-14 01:23:15 +00:00
2017-03-19 23:34:46 +00:00
src = fetchFromGitHub {
owner = "mapeditor";
2019-03-13 23:41:25 +00:00
repo = pname;
2017-03-19 23:34:46 +00:00
rev = "v${version}";
2023-08-09 02:01:02 +00:00
sha256 = "sha256-4Ykr60u2t5cyIZdpFHiRirXg2FqSLCzJzsdvw6r/LK8=";
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
'';
meta = with lib; {
description = "Free, easy to use and flexible tile map editor";
2020-03-04 12:43:57 +00:00
homepage = "https://www.mapeditor.org/";
license = with licenses; [
bsd2 # libtiled and tmxviewer
gpl2Plus # all the rest
];
2018-02-02 08:09:53 +00:00
maintainers = with maintainers; [ dywedir ];
platforms = platforms.linux;
2013-08-14 01:23:15 +00:00
};
}