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-10-08 00:45:52 +00:00
version = "4.1.0";
2021-12-31 11:51:38 +00:00
src = fetchFromGitHub {
owner = "Cubitect";
repo = pname;
rev = version;
2024-10-08 00:45:52 +00:00
hash = "sha256-ORTFddzVGKXpy5V6zXJgCnwLwn/8cWKklpcoHkc6u34=";
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.hostPlatform.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 ];
};
}