Unverified Commit e00ef849 authored by Ulrik Strid's avatar Ulrik Strid Committed by GitHub
Browse files

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

lenovo-legion: 0.0.5 -> 0.0.9
parents 0276fc04 64b547c8
Loading
Loading
Loading
Loading
+14 −7
Original line number Diff line number Diff line
@@ -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;