mirror of
https://github.com/lelgenio/dzgui-nix.git
synced 2025-01-18 14:46:26 -03:00
Compare commits
No commits in common. "80556981662112d5309409dbc22ce0c43205bc26" and "cc9d607926c2302ec7a2936565f4640a42a0f08a" have entirely different histories.
8055698166
...
cc9d607926
29
flake.nix
29
flake.nix
|
@ -3,36 +3,33 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }:
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
# DayZ only runs on x86_64 systems
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
with pkgs; {
|
||||
packages.${system} = rec {
|
||||
default = dzgui;
|
||||
dzgui = pkgs.callPackage ./package { };
|
||||
inherit (pkgs) dzgui;
|
||||
};
|
||||
|
||||
overlays = {
|
||||
default = import ./overlay.nix;
|
||||
default = (final: _: {
|
||||
dzgui = (final.callPackage ./package { });
|
||||
});
|
||||
};
|
||||
|
||||
nixosModules = rec {
|
||||
default = dzgui;
|
||||
dzgui = import ./module.nix;
|
||||
dzgui = import ./module.nix { inherit self; };
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = self.packages.${system}.default.runtimeDeps;
|
||||
};
|
||||
|
||||
checks.${system}.nixosCheck =
|
||||
(nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ ./nixos-test/configuration.nix ];
|
||||
}).config.system.build.toplevel;
|
||||
devShells.${system}.default =
|
||||
mkShell { buildInputs = self.packages.${system}.default.runtimeDeps; };
|
||||
};
|
||||
}
|
||||
|
|
30
module.nix
30
module.nix
|
@ -1,29 +1,25 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{ self, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.programs.dzgui;
|
||||
in
|
||||
{
|
||||
options.programs.dzgui = {
|
||||
enable = lib.mkEnableOption (
|
||||
lib.mdDoc ''
|
||||
Weather to install dzgui and setup workarounds for DayZ to work on linux
|
||||
''
|
||||
);
|
||||
package = lib.mkOption {
|
||||
type = with lib.types; nullOr package;
|
||||
default = pkgs.callPackage ./package { };
|
||||
defaultText = lib.literalExpression "pkgs.dzgui";
|
||||
description = lib.mdDoc "Dzgui package to use.";
|
||||
enable = mkEnableOption (mdDoc ''
|
||||
Weather to install dzgui and setup workarounds for DayZ to work on linux
|
||||
'');
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = pkgs.dzgui;
|
||||
defaultText = literalExpression "pkgs.dzgui";
|
||||
description = mdDoc "Dzgui package to use.";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
config = mkIf cfg.enable {
|
||||
# Needed by DayZ
|
||||
boot.kernel.sysctl."vm.max_map_count" = 1048576;
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
imports = [ ../module.nix ];
|
||||
programs.dzgui.enable = true;
|
||||
|
||||
boot.isContainer = true;
|
||||
system.stateVersion = "24.05";
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
(final: _: { dzgui = (final.callPackage ./package { }); })
|
|
@ -1,26 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
makeWrapper,
|
||||
curl,
|
||||
jq,
|
||||
python3,
|
||||
wmctrl,
|
||||
xdotool,
|
||||
gnome,
|
||||
gobject-introspection,
|
||||
wrapGAppsHook,
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, curl
|
||||
, jq
|
||||
, python3
|
||||
, wmctrl
|
||||
, xdotool
|
||||
, gnome
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dzgui";
|
||||
version = "5.5.0";
|
||||
version = "5.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aclist";
|
||||
repo = "dztui";
|
||||
rev = "bae6a57e1ee5660a07e3a3c326ec68617b831d31";
|
||||
sha256 = "sha256-x5GSyrbEZoru5p70QVRSFx52Njkhvtg/+qc94MqpOmo=";
|
||||
rev = "c2c7b37b904a05cdf0c86dbf3d22ef91728577b9";
|
||||
sha256 = "sha256-iC/c2MBFjvT0wVnKlpX4kL7fVa3BbjpmbEyjCU+aUyY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
@ -39,7 +38,9 @@ stdenv.mkDerivation rec {
|
|||
runtimeDeps = [
|
||||
curl
|
||||
jq
|
||||
(python3.withPackages (p: with p; [ pygobject3 ]))
|
||||
(python3.withPackages (p: with p; [
|
||||
pygobject3
|
||||
]))
|
||||
|
||||
wmctrl
|
||||
xdotool
|
||||
|
|
Loading…
Reference in a new issue