2022-01-19 23:45:15 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, qtbase
|
|
|
|
, qmake
|
2022-06-16 17:23:12 +00:00
|
|
|
, qttools
|
2022-01-19 23:45:15 +00:00
|
|
|
, wrapQtAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cubiomes-viewer";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "2.6.1";
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Cubitect";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-ZXqe+696dNYTkNidEA+s5QQ7Euu7WOdl0EMLU5pKdOY=";
|
2022-01-19 23:45:15 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace cubiomes-viewer.pro \
|
|
|
|
--replace '$$[QT_INSTALL_BINS]/lupdate' lupdate \
|
|
|
|
--replace '$$[QT_INSTALL_BINS]/lrelease' lrelease
|
|
|
|
'';
|
|
|
|
|
2022-01-19 23:45:15 +00:00
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
qmake
|
2022-06-16 17:23:12 +00:00
|
|
|
qttools
|
2022-01-19 23:45:15 +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-16 17:23:12 +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
|
2022-01-19 23:45:15 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2022-01-19 23:45:15 +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 ];
|
|
|
|
};
|
|
|
|
}
|