lenovo-legion: 0.0.12 -> 0.0.18 with patches in master (#348417)

This commit is contained in:
Ulrik Strid 2024-10-17 13:40:40 +02:00 committed by GitHub
commit a1b23cf112
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 28 additions and 10 deletions

View File

@ -3816,6 +3816,13 @@
githubId = 98980; githubId = 98980;
name = "Chmouel Boudjnah"; name = "Chmouel Boudjnah";
}; };
chn = {
name = "Haonan Chen";
email = "chn@chn.moe";
matrix = "@chn:chn.moe";
github = "CHN-beta";
githubId = 35858462;
};
choochootrain = { choochootrain = {
email = "hurshal@imap.cc"; email = "hurshal@imap.cc";
github = "choochootrain"; github = "choochootrain";

View File

@ -1,14 +1,20 @@
{ lib, fetchFromGitHub, xorg, libsForQt5, wrapQtAppsHook, python3 }: {
lib,
fetchFromGitHub,
xorg,
wrapQtAppsHook,
python3,
}:
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "lenovo-legion-app"; pname = "lenovo-legion-app";
version = "0.0.12"; version = "0.0.18";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "johnfanv2"; owner = "johnfanv2";
repo = "LenovoLegionLinux"; repo = "LenovoLegionLinux";
rev = "v${version}-prerelease"; rev = "e9c1d8157a7b25e4334d0b1d887338c670e39f6a";
hash = "sha256-BNrRv9EBmNINQbAw+BzVxKl/XoDgH1tsNZHJxfSpNoU="; hash = "sha256-6JYOTDzz9/flyEDQo1UPjWT5+Cuea5fsdbdc6AooDxU=";
}; };
sourceRoot = "${src.name}/python/legion_linux"; sourceRoot = "${src.name}/python/legion_linux";
@ -16,22 +22,24 @@ python3.pkgs.buildPythonApplication rec {
nativeBuildInputs = [ wrapQtAppsHook ]; nativeBuildInputs = [ wrapQtAppsHook ];
propagatedBuildInputs = with python3.pkgs; [ propagatedBuildInputs = with python3.pkgs; [
pyqt5
pyqt6 pyqt6
argcomplete argcomplete
pyyaml pyyaml
darkdetect darkdetect
xorg.libxcb xorg.libxcb
libsForQt5.qtbase
]; ];
postPatch = '' postPatch = ''
# only fixup application (legion-linux-gui), service (legiond) currently not installed so do not fixup
# version
substituteInPlace ./setup.cfg \ substituteInPlace ./setup.cfg \
--replace-fail "_VERSION" "${version}" --replace-fail "_VERSION" "${version}"
substituteInPlace ../../extra/service/fancurve-set \
--replace-fail "FOLDER=/etc/legion_linux/" "FOLDER=$out/share/legion_linux" # /etc
substituteInPlace ./legion_linux/legion.py \ substituteInPlace ./legion_linux/legion.py \
--replace-fail "/etc/legion_linux" "$out/share/legion_linux" --replace-fail "/etc/legion_linux" "$out/share/legion_linux"
# /usr
substituteInPlace ./legion_linux/legion_gui.desktop \ substituteInPlace ./legion_linux/legion_gui.desktop \
--replace-fail "Icon=/usr/share/pixmaps/legion_logo.png" "Icon=legion_logo" --replace-fail "Icon=/usr/share/pixmaps/legion_logo.png" "Icon=legion_logo"
''; '';
@ -47,8 +55,11 @@ python3.pkgs.buildPythonApplication rec {
homepage = "https://github.com/johnfanv2/LenovoLegionLinux"; homepage = "https://github.com/johnfanv2/LenovoLegionLinux";
license = lib.licenses.gpl2Only; license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux; platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.ulrikstrid ]; maintainers = with lib.maintainers; [
ulrikstrid
realsnick
chn
];
mainProgram = "legion_gui"; mainProgram = "legion_gui";
}; };
} }