forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
178 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{ lib | ||
, stdenv | ||
, boost | ||
, fetchFromGitHub | ||
, git | ||
, makeWrapper | ||
, meson | ||
, ninja | ||
, pkg-config | ||
, python3 | ||
, qtbase | ||
, qtcharts | ||
, tuxclocker-plugins | ||
, wrapQtAppsHook | ||
}: | ||
|
||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "tuxclocker"; | ||
version = "1.4.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "Lurkki14"; | ||
repo = "tuxclocker"; | ||
fetchSubmodules = true; | ||
rev = "${finalAttrs.version}"; | ||
hash = "sha256-8dtuZXBWftXNQpqYgNQOayPGfvEIu9QfbqDShfkt1qA="; | ||
}; | ||
|
||
# Meson doesn't find boost without these | ||
BOOST_INCLUDEDIR = "${lib.getDev boost}/include"; | ||
BOOST_LIBRARYDIR = "${lib.getLib boost}/lib"; | ||
|
||
nativeBuildInputs = [ | ||
git | ||
makeWrapper | ||
meson | ||
ninja | ||
pkg-config | ||
wrapQtAppsHook | ||
]; | ||
|
||
buildInputs = [ | ||
boost | ||
qtbase | ||
qtcharts | ||
]; | ||
|
||
postInstall = '' | ||
wrapProgram "$out/bin/tuxclockerd" \ | ||
--prefix "TEXTDOMAINDIR" : "${tuxclocker-plugins}/share/locale" \ | ||
--prefix "TUXCLOCKER_PLUGIN_PATH" : "${tuxclocker-plugins}/lib/tuxclocker/plugins" \ | ||
--prefix "PYTHONPATH" : "${python3.pkgs.hwdata}/${python3.sitePackages}" | ||
''; | ||
|
||
mesonFlags = [ | ||
"-Dplugins=false" | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Qt overclocking tool for GNU/Linux"; | ||
homepage = "https://github.com/Lurkki14/tuxclocker"; | ||
license = licenses.gpl3Only; | ||
maintainers = with maintainers; [ lurkki ]; | ||
platforms = platforms.linux; | ||
}; | ||
}) |
14 changes: 14 additions & 0 deletions
14
pkgs/by-name/tu/tuxclocker-nvidia-plugin/no-cpu-plugin.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/src/plugins/meson.build b/src/plugins/meson.build | ||
index cdd3b5b..a5a2174 100644 | ||
--- a/src/plugins/meson.build | ||
+++ b/src/plugins/meson.build | ||
@@ -63,9 +63,3 @@ if all_nvidia_linux_libs | ||
install : true, | ||
link_with : libtuxclocker) | ||
endif | ||
- | ||
-shared_library('cpu', 'CPU.cpp', 'Utils.cpp', | ||
- include_directories : [incdir, fplus_inc], | ||
- install_dir : get_option('libdir') / 'tuxclocker' / 'plugins', | ||
- install : true, | ||
- link_with : libtuxclocker) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ lib | ||
, stdenv | ||
, boost | ||
, libX11 | ||
, libXext | ||
, linuxPackages | ||
, openssl | ||
, tuxclocker-plugins | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
pname = "tuxclocker-nvidia-plugin"; | ||
|
||
inherit (tuxclocker-plugins) src version meta BOOST_INCLUDEDIR BOOST_LIBRARYDIR nativeBuildInputs; | ||
|
||
buildInputs = [ | ||
boost | ||
libX11 | ||
libXext | ||
linuxPackages.nvidia_x11 | ||
linuxPackages.nvidia_x11.settings.libXNVCtrl | ||
openssl | ||
]; | ||
|
||
# Build doesn't have a way to disable building the CPU plugin, which is already | ||
# provided by 'tuxclocker-plugins' | ||
patches = [ ./no-cpu-plugin.patch ]; | ||
|
||
mesonFlags = [ | ||
"-Ddaemon=false" | ||
"-Dgui=false" | ||
"-Drequire-nvidia=true" | ||
]; | ||
} |
16 changes: 16 additions & 0 deletions
16
pkgs/by-name/tu/tuxclocker-plugins-with-unfree/package.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ symlinkJoin | ||
, tuxclocker-nvidia-plugin | ||
, tuxclocker-plugins | ||
}: | ||
|
||
symlinkJoin rec { | ||
inherit (tuxclocker-plugins) version meta; | ||
|
||
pname = "tuxclocker-plugins-with-unfree"; | ||
name = "${pname}-${version}"; | ||
|
||
paths = [ | ||
tuxclocker-nvidia-plugin | ||
tuxclocker-plugins | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ lib | ||
, stdenv | ||
, boost | ||
, cmake | ||
, gettext | ||
, git | ||
, libdrm | ||
, meson | ||
, ninja | ||
, openssl | ||
, pkg-config | ||
, python3 | ||
, tuxclocker | ||
}: | ||
|
||
stdenv.mkDerivation { | ||
inherit (tuxclocker) src version meta BOOST_INCLUDEDIR BOOST_LIBRARYDIR; | ||
|
||
pname = "tuxclocker-plugins"; | ||
|
||
nativeBuildInputs = [ | ||
gettext | ||
git | ||
meson | ||
ninja | ||
pkg-config | ||
(python3.withPackages(p: [ p.hwdata ])) | ||
]; | ||
|
||
buildInputs = [ | ||
boost | ||
libdrm | ||
openssl | ||
]; | ||
|
||
mesonFlags = [ | ||
"-Ddaemon=false" | ||
"-Dgui=false" | ||
"-Drequire-amd=true" | ||
"-Drequire-python-hwdata=true" | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters