blob: fe5535eea8db94560db25ed876babb0dfa6ee249 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
{ lib, fetchFromGitHub, xorg, libsForQt5, wrapQtAppsHook, python3 }:
python3.pkgs.buildPythonApplication rec {
pname = "lenovo-legion-app";
version = "0.0.5";
src = fetchFromGitHub {
owner = "johnfanv2";
repo = "LenovoLegionLinux";
rev = "v${version}-prerelease";
sha256 = "sha256-s4JFFmawokdC4qoqNvZDhuJSinhQ3YKSIfAYi79VTTA=";
};
sourceRoot = "${src.name}/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";
};
}
|