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.
radeon-profile-daemon: init at 20190603
- Loading branch information
wedens
committed
Nov 27, 2020
1 parent
215337d
commit 4f7ea26
Showing
4 changed files
with
65 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
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,32 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.services.hardware.radeon-profile; | ||
in | ||
{ | ||
options.services.hardware.radeon-profile = { | ||
enable = mkEnableOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
radeon-profile daemon | ||
''; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ pkgs.radeon-profile ]; | ||
|
||
systemd.services.radeon-profile = { | ||
description = "radeon-profile daemon"; | ||
wantedBy = [ "multi-user.target" ]; | ||
serviceConfig = { | ||
ExecStart = "${pkgs.radeon-profile-daemon}/bin/radeon-profile-daemon"; | ||
PrivateTmp = "yes"; | ||
PrivateDevices = "yes"; | ||
}; | ||
}; | ||
}; | ||
} |
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,30 @@ | ||
{ lib, stdenv, fetchFromGitHub | ||
, qtbase, qtcharts, qmake, libXrandr, libdrm | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
pname = "radeon-profile-daemon"; | ||
version = "20190603"; | ||
|
||
nativeBuildInputs = [ qmake ]; | ||
buildInputs = [ qtbase qtcharts libXrandr libdrm ]; | ||
|
||
src = (fetchFromGitHub { | ||
owner = "marazmista"; | ||
repo = "radeon-profile-daemon"; | ||
rev = version; | ||
sha256 = "06qxq2hv3l9shna8x5d9awbdm9pbwlc6vckcr63kf37rrs8ykk0j"; | ||
}) + "/radeon-profile-daemon"; | ||
|
||
preConfigure = '' | ||
substituteInPlace radeon-profile-daemon.pro \ | ||
--replace "/usr/" "$out/" | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Application to read current clocks of AMD Radeon cards"; | ||
homepage = "https://github.com/marazmista/radeon-profile"; | ||
license = licenses.gpl2Plus; | ||
platforms = platforms.linux; | ||
}; | ||
} |
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