Compare commits

...

6 commits

Author SHA1 Message Date
lelgenio 8055698166 update "5.3.0" -> "5.5.0" 2024-11-11 01:16:37 +00:00
Leonardo Eugênio 38cf2b507d
Merge pull request #3 from lelgenio/automated-update
[Automated] Update dzgui "5.3.0"
2024-10-01 22:13:46 -03:00
lelgenio 54e6c10bac refactor: extract more things from flake.nix 2024-10-01 12:22:18 -03:00
lelgenio f7a0747d62 refactor: be less flake and overlay dependant 2024-10-01 12:17:07 -03:00
lelgenio af1a43a8de fmt: format with nixfmt-rfc-style 2024-10-01 12:10:35 -03:00
lelgenio 6cd3a545f2 flake: add system check 2024-10-01 12:08:52 -03:00
5 changed files with 58 additions and 44 deletions

View file

@ -3,33 +3,36 @@
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; nixpkgs.url = "nixpkgs/nixpkgs-unstable";
}; };
outputs = { self, nixpkgs, ... }: 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";
pkgs = import nixpkgs { pkgs = import nixpkgs { inherit system; };
inherit system;
overlays = [ self.overlays.default ];
};
in in
with pkgs; { {
packages.${system} = rec { packages.${system} = rec {
default = dzgui; default = dzgui;
inherit (pkgs) dzgui; dzgui = pkgs.callPackage ./package { };
}; };
overlays = { overlays = {
default = (final: _: { default = import ./overlay.nix;
dzgui = (final.callPackage ./package { });
});
}; };
nixosModules = rec { nixosModules = rec {
default = dzgui; default = dzgui;
dzgui = import ./module.nix { inherit self; }; dzgui = import ./module.nix;
}; };
devShells.${system}.default = devShells.${system}.default = pkgs.mkShell {
mkShell { buildInputs = self.packages.${system}.default.runtimeDeps; }; buildInputs = self.packages.${system}.default.runtimeDeps;
};
checks.${system}.nixosCheck =
(nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./nixos-test/configuration.nix ];
}).config.system.build.toplevel;
}; };
} }

View file

@ -1,25 +1,29 @@
{ self, ... }: {
{ pkgs, config, lib, ... }: pkgs,
with lib; config,
lib,
...
}:
let let
cfg = config.programs.dzgui; cfg = config.programs.dzgui;
in in
{ {
options.programs.dzgui = { options.programs.dzgui = {
enable = mkEnableOption (mdDoc '' enable = lib.mkEnableOption (
Weather to install dzgui and setup workarounds for DayZ to work on linux lib.mdDoc ''
''); Weather to install dzgui and setup workarounds for DayZ to work on linux
package = mkOption { ''
type = with types; nullOr package; );
default = pkgs.dzgui; package = lib.mkOption {
defaultText = literalExpression "pkgs.dzgui"; type = with lib.types; nullOr package;
description = mdDoc "Dzgui package to use."; default = pkgs.callPackage ./package { };
defaultText = lib.literalExpression "pkgs.dzgui";
description = lib.mdDoc "Dzgui package to use.";
}; };
}; };
config = mkIf cfg.enable { config = lib.mkIf cfg.enable {
# Needed by DayZ # Needed by DayZ
boot.kernel.sysctl."vm.max_map_count" = 1048576; boot.kernel.sysctl."vm.max_map_count" = 1048576;
nixpkgs.overlays = [ self.overlays.default ];
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
}; };
} }

View file

@ -0,0 +1,7 @@
{
imports = [ ../module.nix ];
programs.dzgui.enable = true;
boot.isContainer = true;
system.stateVersion = "24.05";
}

1
overlay.nix Normal file
View file

@ -0,0 +1 @@
(final: _: { dzgui = (final.callPackage ./package { }); })

View file

@ -1,25 +1,26 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, makeWrapper fetchFromGitHub,
, curl makeWrapper,
, jq curl,
, python3 jq,
, wmctrl python3,
, xdotool wmctrl,
, gnome xdotool,
, gobject-introspection gnome,
, wrapGAppsHook gobject-introspection,
wrapGAppsHook,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "dzgui"; pname = "dzgui";
version = "5.3.0"; version = "5.5.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "aclist"; owner = "aclist";
repo = "dztui"; repo = "dztui";
rev = "c2c7b37b904a05cdf0c86dbf3d22ef91728577b9"; rev = "bae6a57e1ee5660a07e3a3c326ec68617b831d31";
sha256 = "sha256-iC/c2MBFjvT0wVnKlpX4kL7fVa3BbjpmbEyjCU+aUyY="; sha256 = "sha256-x5GSyrbEZoru5p70QVRSFx52Njkhvtg/+qc94MqpOmo=";
}; };
postPatch = '' postPatch = ''
@ -38,9 +39,7 @@ stdenv.mkDerivation rec {
runtimeDeps = [ runtimeDeps = [
curl curl
jq jq
(python3.withPackages (p: with p; [ (python3.withPackages (p: with p; [ pygobject3 ]))
pygobject3
]))
wmctrl wmctrl
xdotool xdotool