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

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

77 lines
1.5 KiB
Nix
Raw Permalink Normal View History

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
}:
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 {
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
'';
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
];
2024-10-24 06:19:50 +00:00
maintainers = with maintainers; [ dywedir ryan4yin ];
platforms = platforms.linux;
2013-08-14 01:23:15 +00:00
};
}