-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feral Gamemode #84682
Comments
I will just give a bit of input as I tried to package inih was necessary as a new depenency { stdenv, lib, fetchFromGitHub
, meson
, ninja
, cmake
, pkg-config
}:
stdenv.mkDerivation rec {
pname = "inih";
version = "r48";
src = fetchFromGitHub {
owner = "benhoyt";
repo = "inih";
rev = "${version}";
sha256 = "0517kxhvh6q39iyk1dj1dyp5anawdynlzv6zxx736x4mgf6i2f3k";
};
nativeBuildInputs = [ cmake meson ninja pkg-config ];
configurePhase = "meson build --prefix=$out";
buildPhase = "ninja -C build";
installPhase = ''
ninja -C build install
'';
meta = with lib; {
description = "Simple .INI file parser in C, good for embedded systems.";
platforms = platforms.linux;
};
} Then I followed the AUR packages and the nix wine packages:
{ stdenv_32bit, lib, pkgs, pkgsi686Linux, callPackage
}:
{
gamemode32 = pkgsi686Linux.callPackage ./gamemode32.nix {
pkgArches = [ pkgsi686Linux ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
gamemode = callPackage ./gamemode.nix {
pkgArches = [ pkgs ];
platforms = [ "x86_64-linux" ];
};
}
{ stdenv, lib, fetchFromGitHub
, pkgArches
, platforms
, meson
, ninja
, cmake
, pkgconfig
, systemd
, polkit
, dbus
}:
let
custompkgs = import <custompkgs> {};
in
stdenv.mkDerivation rec {
pname = "gamemode";
version = "1.5.1";
src = fetchFromGitHub {
owner = "FeralInteractive";
repo = "gamemode";
rev = "${version}";
sha256 = "1gp480c8lqz2i576jibbg7gifibkli3rnhhp1k5yrqsbfbn4qxf7";
};
nativeBuildInputs = [ cmake meson ninja pkgconfig ];
buildInputs = [ systemd dbus custompkgs.inih ];
propagatedBuildInputs = [ polkit
systemd ];
postPatch = ''
substituteInPlace daemon/gamemode-tests.c --replace "/usr/bin/gamemoderun" $out/bin/gamemoderun
'';
configurePhase = "meson build --prefix=$out -Dwith-systemd-user-unit-dir=$out/lib/systemd/user --libexecdir $out/lib/gamemode";
buildPhase = "ninja -C build";
installPhase = ''
ninja -C build install
mkdir -p $out/share/doc/${pname}/example
install -m644 -Dt $out/share/doc/${pname}/example example/gamemode.ini
'';
meta = with lib; {
inherit platforms;
description = "Optimise Linux system performance on demand.";
};
}
{ stdenv, lib, fetchFromGitHub
, pkgArches
, platforms
, meson
, ninja
, cmake
, pkgconfig
, systemd
, polkit
, dbus
}:
let
custompkgs = import <custompkgs> {};
in
stdenv.mkDerivation rec {
pname = "gamemode32";
version = "1.5.1";
src = fetchFromGitHub {
owner = "FeralInteractive";
repo = "gamemode";
rev = "${version}";
sha256 = "1gp480c8lqz2i576jibbg7gifibkli3rnhhp1k5yrqsbfbn4qxf7";
};
nativeBuildInputs = [ cmake meson ninja pkgconfig ];
buildInputs = [ systemd dbus custompkgs.inih ];
propagatedBuildInputs = [ polkit
systemd ];
configurePhase = "meson build --prefix=$out -Dwith-daemon=false -Dwith-examples=false -Dwith-systemd=false -Dwith-util=false --libdir lib32";
buildPhase = "ninja -C build";
installPhase = ''
ninja -C build install
'';
meta = with lib; {
inherit platforms;
description = "Optimise Linux system performance on demand.";
};
} Then I added systemd.packages = [ custompkgs.gamemode.gamemode ]; and, importantly, deactivated
|
I am also trying to package this. I've noticed that the binary of I'm sure a package can't depend on itself but there must be some way to get the package to know about it's own lib directory. I'm a bit surprised that this is not default behavior. |
I marked this as stale due to inactivity. → More info |
Still important to me. |
I marked this as stale due to inactivity. → More info |
Closed by #123433. |
Project description
GameMode is a daemon/lib combo for Linux that allows games to request a set of optimisations be temporarily applied to the host OS and/or a game process.
Metadata
The text was updated successfully, but these errors were encountered: