2021-12-31 11:51:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qtbase
|
|
|
|
, qmake
|
2022-06-03 19:39:56 +00:00
|
|
|
, qttools
|
2021-12-31 11:51:38 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cubiomes-viewer";
|
2023-01-21 01:00:04 +00:00
|
|
|
version = "3.0.0";
|
2021-12-31 11:51:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cubitect";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2023-01-21 01:00:04 +00:00
|
|
|
sha256 = "sha256-yT8PDmMntnd5meDPJm1rekfDVgmWFSZTNFEH03AKCy0=";
|
2021-12-31 11:51:38 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-06-03 19:39:56 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cubiomes-viewer.pro \
|
|
|
|
--replace '$$[QT_INSTALL_BINS]/lupdate' lupdate \
|
|
|
|
--replace '$$[QT_INSTALL_BINS]/lrelease' lrelease
|
|
|
|
'';
|
|
|
|
|
2021-12-31 11:51:38 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
2022-06-03 19:39:56 +00:00
|
|
|
qttools
|
2021-12-31 11:51:38 +00:00
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
# QMAKE_PRE_LINK is not executed (I dont know why)
|
|
|
|
make -C ./cubiomes libcubiomes CFLAGS="-DSTRUCT_CONFIG_OVERRIDE=1" all
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp cubiomes-viewer $out/bin
|
|
|
|
|
2022-06-03 19:39:56 +00:00
|
|
|
mkdir -p $out/share/{pixmaps,applications}
|
|
|
|
cp rc/icons/map.png $out/share/pixmaps/com.github.cubitect.cubiomes-viewer.png
|
|
|
|
cp etc/com.github.cubitect.cubiomes-viewer.desktop $out/share/applications
|
2021-12-31 11:51:38 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-28 13:28:44 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-12-31 11:51:38 +00:00
|
|
|
homepage = "https://github.com/Cubitect/cubiomes-viewer";
|
|
|
|
description = "A graphical Minecraft seed finder and map viewer";
|
|
|
|
longDescription = ''
|
|
|
|
Cubiomes Viewer provides a graphical interface for the efficient and flexible seed-finding
|
|
|
|
utilities provided by cubiomes and a map viewer for the Minecraft biomes and structure generation.
|
|
|
|
'';
|
|
|
|
platforms = platforms.all;
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = with maintainers; [ hqurve ];
|
|
|
|
};
|
|
|
|
}
|