Skip to content

Commit

Permalink
radeon-profile-daemon: init at 20190603
Browse files Browse the repository at this point in the history
  • Loading branch information
wedens committed Nov 27, 2020
1 parent 215337d commit 4f7ea26
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@
./services/hardware/pcscd.nix
./services/hardware/pommed.nix
./services/hardware/ratbagd.nix
./services/hardware/radeon-profile.nix
./services/hardware/sane.nix
./services/hardware/sane_extra_backends/brscan4.nix
./services/hardware/sane_extra_backends/dsseries.nix
Expand Down
32 changes: 32 additions & 0 deletions nixos/modules/services/hardware/radeon-profile.nix
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";
};
};
};
}
30 changes: 30 additions & 0 deletions pkgs/tools/misc/radeon-profile-daemon/default.nix
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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6791,6 +6791,8 @@ in

radeon-profile = libsForQt5.callPackage ../tools/misc/radeon-profile { };

radeon-profile-daemon = libsForQt5.callPackage ../tools/misc/radeon-profile-daemon { };

radsecproxy = callPackage ../tools/networking/radsecproxy { };

radvd = callPackage ../tools/networking/radvd { };
Expand Down

0 comments on commit 4f7ea26

Please sign in to comment.