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.

72 lines
1.6 KiB
Nix
Raw Normal View History

2021-12-31 11:51:38 +00:00
{ lib
, stdenv
, fetchFromGitHub
, qtbase
, qmake
, wrapQtAppsHook
, copyDesktopItems
, makeDesktopItem
}:
stdenv.mkDerivation rec {
pname = "cubiomes-viewer";
2022-04-16 20:31:02 +00:00
version = "2.1.1";
2021-12-31 11:51:38 +00:00
src = fetchFromGitHub {
owner = "Cubitect";
repo = pname;
rev = version;
2022-04-16 20:31:02 +00:00
sha256 = "sha256-cIA6W82XEeW0k9WNygZ/KVFZE31QThpkV4OazVEvmtw=";
2021-12-31 11:51:38 +00:00
fetchSubmodules = true;
};
buildInputs = [
qtbase
];
nativeBuildInputs = [
qmake
wrapQtAppsHook
copyDesktopItems
];
desktopItems = [ (makeDesktopItem {
name = pname;
desktopName = "Cubiomes Viewer";
exec = pname;
icon = pname;
categories = [ "Game" ];
2021-12-31 11:51:38 +00:00
comment = meta.description;
}) ];
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
mkdir -p $out/share/pixmaps
2022-03-04 10:59:55 +00:00
cp rc/icons/map.png $out/share/pixmaps/cubiomes-viewer.png
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 = "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 ];
};
}