update 3.3.0 -> 5.2.3

This commit is contained in:
lelgenio 2024-05-07 21:29:59 -03:00
parent 2ed6515b27
commit 03968bade4
6 changed files with 44 additions and 117 deletions

View file

@ -1,21 +1,46 @@
{ pkgs, lib, stdenv, fetchFromGitHub, makeWrapper }: { lib
, stdenv
, fetchFromGitHub
, makeWrapper
, curl
, jq
, python3
, wmctrl
, xdotool
, gnome
, gobject-introspection
, wrapGAppsHook
}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dzgui"; pname = "dzgui";
version = "3.3.0"; version = "5.2.3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aclist"; owner = "aclist";
repo = "dztui"; repo = "dztui";
rev = "10c29c0542a07fb81b5922f96b416e3a2e8079cc"; rev = "release/${version}";
sha256 = "sha256-VmW0ohXK+9CAr4yGaA/NSW7+E1vUvZthom8MculmOEs="; sha256 = "sha256-fXFu2p9jxYfmsrQ1DBbd6pLcgRs/8HJiH6t4A5KevyQ=";
}; };
nativeBuildInputs = [ makeWrapper ]; 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
'';
runtimeDeps = with pkgs; [ nativeBuildInputs = [
makeWrapper
gobject-introspection
wrapGAppsHook
];
runtimeDeps = [
curl curl
jq jq
python3 (python3.withPackages (p: with p; [
pygobject3
]))
wmctrl wmctrl
xdotool xdotool
gnome.zenity gnome.zenity
@ -26,21 +51,19 @@ stdenv.mkDerivation rec {
# steam # steam
]; ];
patches = lib.pipe ./patches [
builtins.readDir
lib.attrNames
(map (name: ./patches/${name}))
];
installPhase = '' installPhase = ''
install -DT dzgui.sh $out/bin/.dzgui-unwrapped_ install -DT dzgui.sh $out/bin/dzgui
makeWrapper $out/bin/.dzgui-unwrapped_ $out/bin/dzgui \
--prefix PATH ':' ${lib.makeBinPath runtimeDeps}
install -DT ${./dzgui.desktop} $out/share/applications/dzgui.desktop install -DT ${./dzgui.desktop} $out/share/applications/dzgui.desktop
install -DT images/dzgui $out/share/icons/hicolor/256x256/apps/dzgui.png install -DT images/dzgui $out/share/icons/hicolor/256x256/apps/dzgui.png
''; '';
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH ':' ${lib.makeBinPath runtimeDeps}
)
'';
meta = with lib; { meta = with lib; {
homepage = "https://github.com/pronovic/banner"; homepage = "https://github.com/pronovic/banner";
description = "DayZ TUI/GUI server browser"; description = "DayZ TUI/GUI server browser";

View file

@ -1,28 +1,12 @@
{ {
"nodes": { "nodes": {
"dzgui": {
"flake": false,
"locked": {
"lastModified": 1702780245,
"narHash": "sha256-cdW5LN2Q7eYW8xIqKPQfeYPd7e6VdJGaoA9NMHesCrE=",
"owner": "aclist",
"repo": "dztui",
"rev": "28323f3edb8fa747dc559d1939ccdd7729e4e3a1",
"type": "github"
},
"original": {
"owner": "aclist",
"repo": "dztui",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1702539185, "lastModified": 1714562304,
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", "rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -33,7 +17,6 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"dzgui": "dzgui",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

View file

@ -2,12 +2,8 @@
description = "DayZ TUI/GUI server browser"; description = "DayZ TUI/GUI server browser";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
dzgui = {
url = "github:aclist/dztui";
flake = false;
};
}; };
outputs = { self, nixpkgs, dzgui, ... }: outputs = { self, nixpkgs, ... }:
let let
# DayZ only runs on x86_64 systems # DayZ only runs on x86_64 systems
system = "x86_64-linux"; system = "x86_64-linux";
@ -24,7 +20,7 @@
overlays = { overlays = {
default = (final: _: { default = (final: _: {
dzgui = (final.callPackage ./. { }).overrideAttrs (_: { src = dzgui; }); dzgui = (final.callPackage ./. { });
}); });
}; };

View file

@ -1,25 +0,0 @@
From 79100e2057f8bf9806beacb55b7dca0424d1ca0c Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Wed, 17 May 2023 22:47:53 -0300
Subject: [PATCH 1/3] don't hardcode zenity
---
dzgui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dzgui.sh b/dzgui.sh
index 7c9d023..73c54bb 100755
--- a/dzgui.sh
+++ b/dzgui.sh
@@ -39,7 +39,7 @@ notify_url="$stable_url/helpers/d.html"
notify_img_url="$stable_url/helpers/d.webp"
forum_url="https://github.com/aclist/dztui/discussions"
version_file="$config_path/versions"
-steamsafe_zenity="/usr/bin/zenity"
+steamsafe_zenity="zenity"
#TODO: prevent connecting to offline servers
#TODO: abstract zenity title params and dimensions
--
2.40.1

View file

@ -1,25 +0,0 @@
From 7d2f5301ab455e784d6ec1c5c88b25645a147d16 Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Wed, 17 May 2023 22:36:46 -0300
Subject: [PATCH 2/3] don't check map count
---
dzgui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dzgui.sh b/dzgui.sh
index 73c54bb..893851d 100755
--- a/dzgui.sh
+++ b/dzgui.sh
@@ -1892,7 +1892,7 @@ initial_setup(){
watcher_deps
check_architecture
check_version
- check_map_count
+ # check_map_count
fetch_helpers
config
steam_deps
--
2.40.1

View file

@ -1,25 +0,0 @@
From 0ac99c0f2b5d1b86c1cd155c69e2a3fd86a0d448 Mon Sep 17 00:00:00 2001
From: lelgenio <lelgenio@disroot.org>
Date: Fri, 18 Aug 2023 14:15:35 -0300
Subject: [PATCH 3/3] don't check for new versions
---
dzgui.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dzgui.sh b/dzgui.sh
index 893851d..ec072e4 100755
--- a/dzgui.sh
+++ b/dzgui.sh
@@ -1891,7 +1891,7 @@ initial_setup(){
run_depcheck
watcher_deps
check_architecture
- check_version
+ # check_version
# check_map_count
fetch_helpers
config
--
2.40.1