mirror of
https://github.com/lelgenio/dzgui-nix.git
synced 2025-01-18 22:56:26 -03:00
Compare commits
No commits in common. "eca167dfeb156f1d03eb44f63f92ece0b29872ef" and "c0aa386e8c08946dc2b8713e59a77cb6079a0b62" have entirely different histories.
eca167dfeb
...
c0aa386e8c
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
|
@ -1,18 +0,0 @@
|
|||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- run: nix build -L
|
41
.github/workflows/update.yml
vendored
41
.github/workflows/update.yml
vendored
|
@ -1,41 +0,0 @@
|
|||
name: update
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: DeterminateSystems/nix-installer-action@main
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||
- name: Install jq
|
||||
run: nix profile install nixpkgs#jq
|
||||
- name: Get current version
|
||||
id: current-version
|
||||
run: nix-instantiate --eval --json -A dzgui.version | jq -r '"version=\"\(.)\""' >> $GITHUB_OUTPUT
|
||||
- name: Run update script
|
||||
run: ./package/update.sh
|
||||
- name: Get new version
|
||||
id: new-version
|
||||
run: nix-instantiate --eval --json -A dzgui.version | jq -r '"version=\"\(.)\""' >> $GITHUB_OUTPUT
|
||||
- name: Check for changes
|
||||
id: git-check
|
||||
run: |
|
||||
git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
|
||||
- name: Build new package
|
||||
run: nix build -L
|
||||
- name: Create Pull Request
|
||||
if: ${{ steps.current-version.outputs.version != steps.new-version.outputs.version }}
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
with:
|
||||
base: main
|
||||
add-paths: ./package/
|
||||
commit-message: update ${{ steps.current-version.outputs.version }} -> ${{ steps.new-version.outputs.version }}
|
||||
title: '[Automated] Update dzgui ${{ steps.new-version.outputs.version }}'
|
||||
body: 'Automated changes by GitHub Actions'
|
||||
branch: automated-update
|
||||
delete-branch: true
|
82
default.nix
82
default.nix
|
@ -1,6 +1,80 @@
|
|||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, curl
|
||||
, jq
|
||||
, python3
|
||||
, wmctrl
|
||||
, xdotool
|
||||
, gnome
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
{
|
||||
dzgui = pkgs.callPackage ./package { };
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dzgui";
|
||||
version = "5.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aclist";
|
||||
repo = "dztui";
|
||||
rev = "release/${version}";
|
||||
sha256 = "sha256-fBsowbZPH5KgVvvrnxzdA2oEeEd802jt27yySrLgNqM=";
|
||||
};
|
||||
|
||||
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
|
||||
sed -i '/ write_desktop_file >/d' dzgui.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
runtimeDeps = [
|
||||
curl
|
||||
jq
|
||||
(python3.withPackages (p: with p; [
|
||||
pygobject3
|
||||
]))
|
||||
|
||||
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 = ''
|
||||
install -DT dzgui.sh $out/bin/dzgui
|
||||
|
||||
install -DT ${./dzgui.desktop} $out/share/applications/dzgui.desktop
|
||||
install -DT images/dzgui $out/share/icons/hicolor/256x256/apps/dzgui.png
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH ':' ${lib.makeBinPath runtimeDeps}
|
||||
)
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
overlays = {
|
||||
default = (final: _: {
|
||||
dzgui = (final.callPackage ./package { });
|
||||
dzgui = (final.callPackage ./. { });
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, curl
|
||||
, jq
|
||||
, python3
|
||||
, wmctrl
|
||||
, xdotool
|
||||
, gnome
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dzgui";
|
||||
version = "5.3.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aclist";
|
||||
repo = "dztui";
|
||||
rev = "8e6cf7e7925c6e6bc390a10d286ba1e7b2562d08";
|
||||
sha256 = "sha256-+FlAYTDpjDDmCAFxgmgHVnXGcIw63e5ia38zKbYI2ZI=";
|
||||
};
|
||||
|
||||
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
|
||||
sed -i '/ write_desktop_file >/d' dzgui.sh
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
gobject-introspection
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
runtimeDeps = [
|
||||
curl
|
||||
jq
|
||||
(python3.withPackages (p: with p; [
|
||||
pygobject3
|
||||
]))
|
||||
|
||||
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 = ''
|
||||
install -DT dzgui.sh $out/bin/dzgui
|
||||
|
||||
install -DT ${./dzgui.desktop} $out/share/applications/dzgui.desktop
|
||||
install -DT images/dzgui $out/share/icons/hicolor/256x256/apps/dzgui.png
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix PATH ':' ${lib.makeBinPath runtimeDeps}
|
||||
)
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl jq ripgrep common-updater-scripts
|
||||
|
||||
set -xe
|
||||
|
||||
latest_commit="$(
|
||||
curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} https://api.github.com/repos/aclist/dztui/branches/master \
|
||||
| jq -r .commit.sha
|
||||
)"
|
||||
|
||||
version="$(
|
||||
curl https://raw.githubusercontent.com/aclist/dztui/$latest_commit/dzgui.sh \
|
||||
| rg '^version=(.*)$' --replace '$1'
|
||||
)"
|
||||
|
||||
update-source-version dzgui "$version" --rev=$latest_commit
|
Loading…
Reference in a new issue