Skip to content

Commit b8c13d3

Browse files
authored
zenergy: init at 0-unstable-2024-10-10 (#297598)
2 parents 11761ed + 2f3919e commit b8c13d3

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

maintainers/maintainer-list.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23179,6 +23179,17 @@
2317923179
githubId = 36118348;
2318023180
keys = [ { fingerprint = "69C9 876B 5797 1B2E 11C5 7C39 80A1 F76F C9F9 54AE"; } ];
2318123181
};
23182+
wizardlink = {
23183+
name = "wizardlink";
23184+
email = "[email protected]";
23185+
github = "wizardlink";
23186+
githubId = 26727907;
23187+
keys = [
23188+
{
23189+
fingerprint = "A1D3 A2B4 E14B D7C0 445B B749 A576 7B54 367C FBDF";
23190+
}
23191+
];
23192+
};
2318223193
wizeman = {
2318323194
email = "[email protected]";
2318423195
github = "wizeman";
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
lib,
3+
stdenv,
4+
fetchFromGitHub,
5+
kernel,
6+
kmod,
7+
}:
8+
9+
let
10+
kernelDirectory = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
11+
in
12+
stdenv.mkDerivation {
13+
pname = "zenergy";
14+
version = "0-unstable-2024-10-10";
15+
16+
src = fetchFromGitHub {
17+
owner = "BoukeHaarsma23";
18+
repo = "zenergy";
19+
rev = "7c4e83d5e2f887f4c31edaf92e5f94e9448e9764";
20+
hash = "sha256-5fYelEr4IYnuXrly15IcyicFrF0tYjs7OBqIhUYQXZ0=";
21+
};
22+
23+
nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies;
24+
25+
hardeningDisable = [
26+
"format"
27+
"pic"
28+
];
29+
30+
makeFlags = kernel.makeFlags ++ [ "KDIR=${kernelDirectory}" ];
31+
32+
installTargets = [ "modules_install" ];
33+
34+
preBuild = ''
35+
substituteInPlace Makefile --replace-fail "PWD modules_install" "PWD INSTALL_MOD_PATH=$out modules_install"
36+
'';
37+
38+
meta = with lib; {
39+
description = "Based on AMD_ENERGY driver, but with some jiffies added so non-root users can read it safely.";
40+
homepage = "https://github.com/BoukeHaarsma23/zenergy";
41+
license = licenses.gpl2Only;
42+
maintainers = with maintainers; [ wizardlink ];
43+
platforms = platforms.linux;
44+
};
45+
}

pkgs/top-level/linux-kernels.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,8 @@ in {
407407

408408
new-lg4ff = callPackage ../os-specific/linux/new-lg4ff { };
409409

410+
zenergy = callPackage ../os-specific/linux/zenergy { };
411+
410412
nvidiabl = callPackage ../os-specific/linux/nvidiabl { };
411413

412414
nvidiaPackages = dontRecurseIntoAttrs (lib.makeExtensible (_: callPackage ../os-specific/linux/nvidia-x11 { }));

0 commit comments

Comments
 (0)