linuxKernel.packages.lenovo-legion: init at 2023-04-02-16-53-51
This commit is contained in:
parent
f91ee3065d
commit
77a95ebc94
48
pkgs/os-specific/linux/lenovo-legion/app.nix
Normal file
48
pkgs/os-specific/linux/lenovo-legion/app.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ lib, fetchFromGitHub, xorg, libsForQt5, wrapQtAppsHook, python3 }:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "lenovo-legion-app";
|
||||
version = "2023-04-02-16-53-51";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "johnfanv2";
|
||||
repo = "LenovoLegionLinux";
|
||||
rev = "main${version}";
|
||||
sha256 = "sha256-s4JFFmawokdC4qoqNvZDhuJSinhQ3YKSIfAYi79VTTA=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/python/legion_linux";
|
||||
|
||||
nativeBuildInputs = [ wrapQtAppsHook ];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
pyqt5
|
||||
argcomplete
|
||||
pyyaml
|
||||
xorg.libxcb
|
||||
libsForQt5.qtbase
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
cp -r ./{legion.py,legion_cli.py,legion_gui.py} $out/${python3.sitePackages}
|
||||
cp ./legion_logo.png $out/${python3.sitePackages}/legion_logo.png
|
||||
|
||||
rm -rf $out/data
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
|
||||
preFixup = ''
|
||||
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "An utility to control Lenovo Legion laptop";
|
||||
homepage = "https://github.com/johnfanv2/LenovoLegionLinux";
|
||||
license = lib.licenses.gpl2Only;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
mainProgram = "legion_gui";
|
||||
};
|
||||
}
|
||||
|
34
pkgs/os-specific/linux/lenovo-legion/default.nix
Normal file
34
pkgs/os-specific/linux/lenovo-legion/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ lib, fetchurl, stdenv, kernel, bash, lenovo-legion }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "lenovo-legion-module";
|
||||
inherit (lenovo-legion) version src;
|
||||
|
||||
sourceRoot = "source/kernel_module";
|
||||
|
||||
hardeningDisable = [ "pic" ];
|
||||
|
||||
preConfigure = ''
|
||||
sed -i -e '/depmod/d' ./Makefile
|
||||
'';
|
||||
|
||||
makeFlags = kernel.makeFlags ++ [
|
||||
"SHELL=bash"
|
||||
"KERNELVERSION=${kernel.modDirVersion}"
|
||||
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||
"INSTALLDIR=${placeholder "out"}/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86"
|
||||
"MODDESTDIR=${placeholder "out"}/lib/modules/${kernel.modDirVersion}/kernel/drivers/platform/x86"
|
||||
"DKMSDIR=${placeholder "out"}/lib/modules/${kernel.modDirVersion}/misc"
|
||||
];
|
||||
|
||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||
|
||||
meta = {
|
||||
description = "Linux kernel module for controlling fan and power in Lenovo Legion laptops";
|
||||
homepage = "https://github.com/johnfanv2/LenovoLegionLinux";
|
||||
license = lib.licenses.gpl2Only;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.ulrikstrid ];
|
||||
broken = kernel.kernelOlder "5.15";
|
||||
};
|
||||
}
|
|
@ -32069,6 +32069,8 @@ with pkgs;
|
|||
|
||||
lemonbar-xft = callPackage ../applications/window-managers/lemonbar/xft.nix { };
|
||||
|
||||
lenovo-legion = libsForQt5.callPackage ../os-specific/linux/lenovo-legion/app.nix { };
|
||||
|
||||
legitify = callPackage ../development/tools/legitify { };
|
||||
|
||||
lens = callPackage ../applications/networking/cluster/lens { };
|
||||
|
|
|
@ -386,6 +386,8 @@ in {
|
|||
|
||||
kvdo = callPackage ../os-specific/linux/kvdo {};
|
||||
|
||||
lenovo-legion-module = callPackage ../os-specific/linux/lenovo-legion { };
|
||||
|
||||
liquidtux = callPackage ../os-specific/linux/liquidtux {};
|
||||
|
||||
lkrg = callPackage ../os-specific/linux/lkrg {};
|
||||
|
|
Loading…
Reference in a new issue