nixpkgs/pkgs/applications/misc/cubiomes-viewer/default.nix

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

70 lines
1.7 KiB
Nix
Raw Normal View History

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";
2024-02-12 22:58:05 +00:00
version = "4.0.1";
2021-12-31 11:51:38 +00:00
src = fetchFromGitHub {
owner = "Cubitect";
repo = pname;
rev = version;
2024-02-12 22:58:05 +00:00
sha256 = "sha256-UUvNSTM98r8D/Q+/pPTXwGzW4Sl1qhgem4WsFRfybuo=";
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; {
broken = stdenv.isDarwin;
2021-12-31 11:51:38 +00:00
homepage = "https://github.com/Cubitect/cubiomes-viewer";
description = "Graphical Minecraft seed finder and map viewer";
mainProgram = "cubiomes-viewer";
2021-12-31 11:51:38 +00:00
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 ];
};
}