From dae2fec8a756f659e8f4affe42fb1de818e0ff1a Mon Sep 17 00:00:00 2001 From: hqurve Date: Fri, 3 Jun 2022 15:39:56 -0400 Subject: [PATCH] cubiomes-viewer: 2.1.1 -> 2.2.2 --- .../misc/cubiomes-viewer/default.nix | 29 +++++++++---------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/misc/cubiomes-viewer/default.nix b/pkgs/applications/misc/cubiomes-viewer/default.nix index 762b0e09725f..48d1d4a4f99f 100644 --- a/pkgs/applications/misc/cubiomes-viewer/default.nix +++ b/pkgs/applications/misc/cubiomes-viewer/default.nix @@ -3,42 +3,38 @@ , fetchFromGitHub , qtbase , qmake +, qttools , wrapQtAppsHook -, copyDesktopItems -, makeDesktopItem }: stdenv.mkDerivation rec { pname = "cubiomes-viewer"; - version = "2.1.1"; + version = "2.2.2"; src = fetchFromGitHub { owner = "Cubitect"; repo = pname; rev = version; - sha256 = "sha256-cIA6W82XEeW0k9WNygZ/KVFZE31QThpkV4OazVEvmtw="; + sha256 = "sha256-jwYmgA2JtWpEbuuFPwGdKKaSZ2uAs3t7CCCeu6eD9nI="; fetchSubmodules = true; }; + postPatch = '' + substituteInPlace cubiomes-viewer.pro \ + --replace '$$[QT_INSTALL_BINS]/lupdate' lupdate \ + --replace '$$[QT_INSTALL_BINS]/lrelease' lrelease + ''; + buildInputs = [ qtbase ]; nativeBuildInputs = [ qmake + qttools wrapQtAppsHook - copyDesktopItems ]; - desktopItems = [ (makeDesktopItem { - name = pname; - desktopName = "Cubiomes Viewer"; - exec = pname; - icon = pname; - categories = [ "Game" ]; - comment = meta.description; - }) ]; - preBuild = '' # QMAKE_PRE_LINK is not executed (I dont know why) make -C ./cubiomes libcubiomes CFLAGS="-DSTRUCT_CONFIG_OVERRIDE=1" all @@ -50,8 +46,9 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp cubiomes-viewer $out/bin - mkdir -p $out/share/pixmaps - cp rc/icons/map.png $out/share/pixmaps/cubiomes-viewer.png + 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 runHook postInstall '';