Skip to content
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

gamemode: init at 1.4 #67779

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 30 additions & 0 deletions pkgs/games/gamemode/default.nix
@@ -0,0 +1,30 @@
{ stdenv, meson, ninja, fetchFromGitHub, systemd, pkgconfig, dbus }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ stdenv, meson, ninja, fetchFromGitHub, systemd, pkgconfig, dbus }:
{ stdenv, meson, ninja, fetchFromGitHub, systemd, pkg-config, dbus }:


stdenv.mkDerivation rec {
pname = "gamemode";
version = "1.4";

nativeBuildInputs = [ meson ninja pkgconfig ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
nativeBuildInputs = [ meson ninja pkgconfig ];
nativeBuildInputs = [ meson ninja pkg-config ];


buildInputs = [ systemd dbus ];

src = fetchFromGitHub {
owner = "FeralInteractive";
repo = "gamemode";
rev = "7ced21f4b30cc4ceb67928889bc57af8784f1009";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rev = "7ced21f4b30cc4ceb67928889bc57af8784f1009";
rev = version;

sha256 = "19s73yblbv8c7dw41sb713cjy1y6wr2srn9wvqdcsqgc159z4sj2";
fetchSubmodules = true;
};

mesonFlags = "-Dwith-systemd-user-unit-dir=share/systemd/user";

patches = [ ./gamemoderun.patch ];

meta = with stdenv.lib; {
description = "Optimise Linux system performance on demand";
homepage = https://github.com/FeralInteractive/GameMode/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote homepage per RFC45

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or simply use src.meta.homepage ;)

license = licenses.bsd3;
platforms = platforms.linux;
maintainers = [ maintainers.leo60228 ];
};
}
15 changes: 15 additions & 0 deletions pkgs/games/gamemode/gamemoderun.patch
@@ -0,0 +1,15 @@
diff --git a/data/gamemoderun.in b/data/gamemoderun.in
index 659e33e..3c7399c 100755
--- a/data/gamemoderun.in
+++ b/data/gamemoderun.in
@@ -5,6 +5,9 @@
# appropriate path depending on whether the app is 32- or 64-bit.
GAMEMODEAUTO="@GAMEMODE_PREFIX@/\$LIB/libgamemodeauto.so.0"

+GAMEMODE="@GAMEMODE_PREFIX@/\$LIB/"
+
LD_PRELOAD="${GAMEMODEAUTO}${LD_PRELOAD:+:$LD_PRELOAD}"
+LD_LIBRARY_PATH="${GAMEMODE}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"

-exec $GAMEMODERUNEXEC env LD_PRELOAD="${LD_PRELOAD}" "$@"
+exec $GAMEMODERUNEXEC env LD_PRELOAD="${LD_PRELOAD}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" "$@"
leo60228 marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -22154,6 +22154,8 @@ in

gambatte = callPackage ../games/gambatte { };

gamemode = callPackage ../games/gamemode { };

garden-of-coloured-lights = callPackage ../games/garden-of-coloured-lights { allegro = allegro4; };

gargoyle = callPackage ../games/gargoyle {
Expand Down