Merge pull request #263760 from ulrikstrid/ulrikstrid--lenovo-legion-linux-0_0_9

lenovo-legion: 0.0.5 -> 0.0.9
This commit is contained in:
Ulrik Strid 2023-10-28 21:41:10 +02:00 committed by GitHub
commit e00ef84927
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "lenovo-legion-app";
version = "0.0.5";
version = "0.0.9";
src = fetchFromGitHub {
owner = "johnfanv2";
repo = "LenovoLegionLinux";
rev = "v${version}-prerelease";
sha256 = "sha256-s4JFFmawokdC4qoqNvZDhuJSinhQ3YKSIfAYi79VTTA=";
rev = "v${version}-prerelese";
hash = "sha256-P4vqzNX2nF4LnoQDOV8WEiXAICQCyjj9xPpFNvMu93k=";
};
sourceRoot = "${src.name}/python/legion_linux";
@ -19,15 +19,22 @@ python3.pkgs.buildPythonApplication rec {
pyqt5
argcomplete
pyyaml
darkdetect
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
postPatch = ''
substituteInPlace ./setup.cfg \
--replace "_VERSION" "${version}"
substituteInPlace ../../extra/service/fancurve-set \
--replace "FOLDER=/etc/legion_linux/" "FOLDER=$out/share/legion_linux"
substituteInPlace ./legion_linux/legion.py \
--replace "/etc/legion_linux" "$out/share/legion_linux"
'';
rm -rf $out/data
postInstall = ''
cp ./legion_linux/legion_logo.png $out/${python3.sitePackages}/legion_logo.png
'';
dontWrapQtApps = true;