2024-05-07 21:29:59 -03:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, makeWrapper
|
|
|
|
, curl
|
|
|
|
, jq
|
|
|
|
, python3
|
|
|
|
, wmctrl
|
|
|
|
, xdotool
|
|
|
|
, gnome
|
|
|
|
, gobject-introspection
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2023-01-22 14:59:45 -03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dzgui";
|
2024-06-11 00:43:36 -03:00
|
|
|
version = "5.2.4";
|
2023-01-22 14:59:45 -03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aclist";
|
|
|
|
repo = "dztui";
|
2024-05-07 21:29:59 -03:00
|
|
|
rev = "release/${version}";
|
2024-06-11 00:43:36 -03:00
|
|
|
sha256 = "sha256-fBsowbZPH5KgVvvrnxzdA2oEeEd802jt27yySrLgNqM=";
|
2023-01-22 14:59:45 -03:00
|
|
|
};
|
|
|
|
|
2024-05-07 21:29:59 -03:00
|
|
|
postPatch = ''
|
|
|
|
sed -i 's@/usr/bin/zenity@zenity@g' dzgui.sh
|
|
|
|
sed -i '/ check_map_count/d' dzgui.sh
|
|
|
|
sed -i '/ check_version/d' dzgui.sh
|
2024-06-11 19:17:37 -03:00
|
|
|
sed -i '/ write_desktop_file >/d' dzgui.sh
|
2024-05-07 21:29:59 -03:00
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
gobject-introspection
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
2023-01-22 14:59:45 -03:00
|
|
|
|
2024-05-07 21:29:59 -03:00
|
|
|
runtimeDeps = [
|
2023-01-22 14:59:45 -03:00
|
|
|
curl
|
|
|
|
jq
|
2024-05-07 21:29:59 -03:00
|
|
|
(python3.withPackages (p: with p; [
|
|
|
|
pygobject3
|
|
|
|
]))
|
|
|
|
|
2023-01-22 14:59:45 -03:00
|
|
|
wmctrl
|
|
|
|
xdotool
|
|
|
|
gnome.zenity
|
|
|
|
|
|
|
|
## Here we don't declare steam as a dependency because
|
|
|
|
## we could either use the native or flatpack version
|
|
|
|
## and also so this does not become a non-free package
|
|
|
|
# steam
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2024-05-07 21:29:59 -03:00
|
|
|
install -DT dzgui.sh $out/bin/dzgui
|
2023-05-17 22:43:20 -03:00
|
|
|
|
|
|
|
install -DT ${./dzgui.desktop} $out/share/applications/dzgui.desktop
|
|
|
|
install -DT images/dzgui $out/share/icons/hicolor/256x256/apps/dzgui.png
|
2023-01-22 14:59:45 -03:00
|
|
|
'';
|
|
|
|
|
2024-05-07 21:29:59 -03:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
--prefix PATH ':' ${lib.makeBinPath runtimeDeps}
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2023-01-22 14:59:45 -03:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/pronovic/banner";
|
|
|
|
description = "DayZ TUI/GUI server browser";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
|
|
|
|
longDescription = ''
|
|
|
|
DZGUI allows you to connect to both official and modded/community DayZ
|
|
|
|
servers on Linux and provides a graphical interface for doing so.
|
|
|
|
'';
|
|
|
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|