Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mcontrolcenter: init at 0.4.1 #251816

Closed
wants to merge 3 commits into from
Closed

Conversation

nadimkobeissi
Copy link
Contributor

MControlCenter provides a relatively full-featured control panel for MSI laptops, written in Qt. It allows users to control MSI laptop power plans, fan speed, battery charging limits, keyboard backlight settings, USB power sharing and more.

The application comes with strong desktop integration: shortcuts, taskbar item, etc. etc. -- screenshots here:
https://github.com/dmitry-s93/MControlCenter/blob/main/README.md

This package has been previous requested by the NixOS community: #244881

The package comes with a patch that corrects MControlCenter's path to the modprobe binary, allowing it to automatically load the ec_sys kernel module (included with NixOS by default) with the right settings when launched.

This NixOS package has been fully tested on a NixOS Plasma5 desktop.

Description of changes

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 23.11 Release Notes (or backporting 23.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

MControlCenter provides a relatively full-featured control panel
for MSI laptops, written in Qt. It allows users to control MSI
laptop power plans, fan speed, battery charging limits, keyboard
backlight settings, USB power sharing and more.

The application comes with strong desktop integration: shortcuts,
taskbar item, etc. etc. -- screenshots here:
https://github.com/dmitry-s93/MControlCenter/blob/main/README.md

This package has been previous requested by the NixOS community:
NixOS#244881

The package comes with a patch that corrects MControlCenter's path
to the `modprobe` binary, allowing it to automatically load the
`ec_sys` kernel module (included with NixOS by default) with
the right settings when launched.

This NixOS package has been fully tested on a NixOS Plasma5 desktop.
Copy link
Member

@FliegendeWurst FliegendeWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. There are a lot of open PRs and not enough reviewers.


meta = with lib; {
homepage = "https://github.com/dmitry-s93/MControlCenter";
description = "An application that allows you to change the settings of MSI laptops running Linux.";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description = "An application that allows you to change the settings of MSI laptops running Linux.";
description = "Tool to change the settings of MSI laptops running Linux";

meta = with lib; {
homepage = "https://github.com/dmitry-s93/MControlCenter";
description = "An application that allows you to change the settings of MSI laptops running Linux.";
licencse = licenses.gpl3;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
licencse = licenses.gpl3;
licencse = licenses.gpl3Plus;

https://github.com/dmitry-s93/MControlCenter/blob/main/src/main.cpp#L8

"-DENABLE_INSTALL=ON"
];

installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
installPhase = ''
installPhase = ''
runHook preInstall

echo "Name=mcontrolcenter.helper" >> $out/share/dbus-1/system-services/mcontrolcenter.helper.service
echo "Exec=$out/libexec/mcontrolcenter-helper" >> $out/share/dbus-1/system-services/mcontrolcenter.helper.service
echo "User=root" >> $out/share/dbus-1/system-services/mcontrolcenter.helper.service
'';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
'';
runHook postInstall
'';

];

buildInputs = [
pkgs.cmake
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pkgs.cmake

];

nativeBuildInputs = [
wrapQtAppsHook
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wrapQtAppsHook
cmake
wrapQtAppsHook

@@ -0,0 +1,62 @@
{ pkgs, lib, stdenv, qtbase, wrapQtAppsHook, qttools, makeDesktopItem, copyDesktopItems, fetchFromGitHub }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ pkgs, lib, stdenv, qtbase, wrapQtAppsHook, qttools, makeDesktopItem, copyDesktopItems, fetchFromGitHub }:
{ pkgs, lib, stdenv, qtbase, wrapQtAppsHook, qttools, makeDesktopItem, copyDesktopItems, fetchFromGitHub, cmake }:

@@ -0,0 +1,62 @@
{ pkgs, lib, stdenv, qtbase, wrapQtAppsHook, qttools, makeDesktopItem, copyDesktopItems, fetchFromGitHub }:

stdenv.mkDerivation (finalAttrs: rec {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
stdenv.mkDerivation (finalAttrs: rec {
stdenv.mkDerivation (finalAttrs: {

@@ -0,0 +1,2 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.libsForQt5.callPackage ./derivation.nix {}
Copy link
Member

@FliegendeWurst FliegendeWurst Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually, this line would be in pkgs/top-level/all-packages.nix.
Also please don't try to import <nixpkgs> in nixpkgs.

@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict labels Mar 19, 2024
@Tommimon Tommimon mentioned this pull request Apr 23, 2024
13 tasks
@Tommimon
Copy link
Contributor

I would consider closing this pull request. I contacted personally the author and he is not interested in completing it any more, he also encouraged me to take over the work if I have a need for this package. I think is better to move the effort to #306216 and try to get this package merged.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 23, 2024
@Tommimon
Copy link
Contributor

#306216 has just been merged, mcontrolcenter is now into master, there is no need for this pull request any more, please can we close it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants