-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
mcontrolcenter: init at 0.4.1 #251816
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11931,6 +11931,13 @@ | |
fingerprint = "9E6A 25F2 C1F2 9D76 ED00 1932 1261 173A 01E1 0298"; | ||
}]; | ||
}; | ||
nadimkobeissi = { | ||
name = "Nadim Kobeissi"; | ||
email = "[email protected]"; | ||
github = "nadimkobeissi"; | ||
githubId = 9953; | ||
matrix = "@nadimkobeissi:matrix.org"; | ||
}; | ||
nadrieril = { | ||
email = "[email protected]"; | ||
github = "Nadrieril"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
pkgs.libsForQt5.callPackage ./derivation.nix {} | ||
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,62 @@ | ||||||||
{ pkgs, lib, stdenv, qtbase, wrapQtAppsHook, qttools, makeDesktopItem, copyDesktopItems, fetchFromGitHub }: | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
stdenv.mkDerivation (finalAttrs: rec { | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
pname = "mcontrolcenter"; | ||||||||
version = "0.4.1"; | ||||||||
|
||||||||
desktopItems = [ | ||||||||
(makeDesktopItem { | ||||||||
name = "MControlCenter"; | ||||||||
exec = "mcontrolcenter"; | ||||||||
icon = "mcontrolcenter"; | ||||||||
comment = finalAttrs.meta.description; | ||||||||
desktopName = "MControlCenter"; | ||||||||
categories = [ "System" ]; | ||||||||
}) | ||||||||
]; | ||||||||
|
||||||||
buildInputs = [ | ||||||||
pkgs.cmake | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
qtbase | ||||||||
]; | ||||||||
|
||||||||
nativeBuildInputs = [ | ||||||||
wrapQtAppsHook | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
qttools | ||||||||
copyDesktopItems | ||||||||
]; | ||||||||
|
||||||||
src = fetchFromGitHub { | ||||||||
owner = "dmitry-s93"; | ||||||||
repo = "MControlCenter"; | ||||||||
rev = "f04ca9878f0ccfa5ea849a3bd17bcb79a5f52a0a"; | ||||||||
hash = "sha256-SV78OVRGzy2zFLT3xqeUtbjlh81Z97PVao18P3h/8dI="; | ||||||||
}; | ||||||||
|
||||||||
patches = [ ./modprobe.patch ]; | ||||||||
|
||||||||
cmakeFlags = [ | ||||||||
"-DENABLE_TESTING=OFF" | ||||||||
"-DENABLE_INSTALL=ON" | ||||||||
]; | ||||||||
|
||||||||
installPhase = '' | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
install -Dm755 mcontrolcenter $out/bin/mcontrolcenter | ||||||||
install -Dm755 helper/mcontrolcenter-helper $out/libexec/mcontrolcenter-helper | ||||||||
install -Dm644 $src/resources/mcontrolcenter.svg $out/share/icons/hicolor/32x32/apps/mcontrolcenter.svg | ||||||||
install -Dm644 $src/src/helper/mcontrolcenter-helper.conf $out/share/dbus-1/system.d/mcontrolcenter-helper.conf | ||||||||
mkdir -p $out/share/dbus-1/system-services | ||||||||
echo "[D-BUS Service]" >> $out/share/dbus-1/system-services/mcontrolcenter.helper.service | ||||||||
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 | ||||||||
''; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
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."; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
licencse = licenses.gpl3; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
https://github.com/dmitry-s93/MControlCenter/blob/main/src/main.cpp#L8 |
||||||||
platforms = with platforms; linux; | ||||||||
maintainers = [ maintainers.nadimkobeissi ]; | ||||||||
}; | ||||||||
}) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/src/helper/helper.cpp b/src/helper/helper.cpp | ||
index 5c291c8..382c18f 100644 | ||
--- a/src/helper/helper.cpp | ||
+++ b/src/helper/helper.cpp | ||
@@ -57,7 +57,7 @@ bool Helper::isEcSysModuleLoaded() const { | ||
bool Helper::loadEcSysModule() const { | ||
fprintf(stderr, "%s\n", qPrintable("Trying to load the ec_sys kernel module")); | ||
auto *process = new QProcess(); | ||
- process->start("sh", QStringList() << "-c" << "/usr/sbin/modprobe ec_sys write_support=1 2>&1"); | ||
+ process->start("sh", QStringList() << "-c" << "/run/current-system/sw/bin/modprobe ec_sys write_support=1 2>&1"); | ||
process->waitForFinished(1000); | ||
if (QByteArray output = process->readAllStandardOutput(); output != "") | ||
fprintf(stderr, "%s", qPrintable(output)); |
There was a problem hiding this comment.
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.