Merge pull request #273808 from K900/asusctl-5.0.0

asusctl: 4.7.2 -> 5.0.0, supergfxctl: 5.1.1 -> 5.1.2
This commit is contained in:
K900 2023-12-13 13:47:31 +03:00 committed by GitHub
commit 14c5d38b53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 617 additions and 431 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,6 @@
{ lib
, rustPlatform
, fetchFromGitLab
, e2fsprogs
, systemd
, coreutils
, pkg-config
@ -9,17 +8,18 @@
, fontconfig
, gtk3
, libappindicator
, libGL
}:
rustPlatform.buildRustPackage rec {
pname = "asusctl";
version = "4.7.2";
version = "5.0.0";
src = fetchFromGitLab {
owner = "asus-linux";
repo = "asusctl";
rev = version;
hash = "sha256-q4V0Cn6kZeyIMGxu/blVi/Ot8LIcv+GlZhpkTQNTjRU=";
hash = "sha256-ZdPSUXchQ19awvlNFVih38p6AU7KQ2RttUnm8zQnTWs=";
};
cargoHash = "";
@ -44,8 +44,6 @@ rustPlatform.buildRustPackage rec {
substituteInPlace $file --replace /usr/share $out/share
done
substituteInPlace asusd/src/ctrl_platform.rs --replace /usr/bin/chattr ${e2fsprogs}/bin/chattr
substituteInPlace data/asusd.rules --replace systemctl ${systemd}/bin/systemctl
substituteInPlace data/asusd.service \
--replace /usr/bin/asusd $out/bin/asusd \
@ -67,7 +65,7 @@ rustPlatform.buildRustPackage rec {
'';
postFixup = ''
patchelf --add-rpath "${libappindicator}/lib" "$out/bin/rog-control-center"
patchelf --add-rpath "${libappindicator}/lib:${libGL}/lib" "$out/bin/rog-control-center"
'';
meta = with lib; {

View file

@ -1,33 +1,22 @@
{ lib
, rustPlatform
, fetchFromGitLab
, fetchpatch
, pkg-config
, systemd
}:
rustPlatform.buildRustPackage rec {
pname = "supergfxctl";
version = "5.1.1";
version = "5.1.2";
src = fetchFromGitLab {
owner = "asus-linux";
repo = "supergfxctl";
rev = version;
hash = "sha256-AThaZ9dp5T/DtLPE6gZ9qgkw0xksiq+VCL9Y4G41voE=";
hash = "sha256-HJGyjFeN3bq+ArCGfFHAMnjW76wSnNyxPWR0ELcyjLg=";
};
# fix reported version in Cargo.lock
# submitted upstream: https://gitlab.com/asus-linux/supergfxctl/-/merge_requests/31
# FIXME: remove for next update
cargoPatches = [
(fetchpatch {
url = "https://gitlab.com/asus-linux/supergfxctl/-/commit/8812dd208791d162881d72f785650a3344ec5151.diff";
hash = "sha256-eFFj2nIwGXHV1vMIpZvdvFPtfNLDfgqyGRt+VvB03LE=";
})
];
cargoSha256 = "sha256-gbRGUWfpCQjCxuTdQ+qwOeCDU17G3nNFkIPAgzmeL+E=";
cargoSha256 = "sha256-wPqCXbpSYXwsUi1mv9ZBSxdhDgDqsjKxnPzQcURlnDU=";
postPatch = ''
substituteInPlace data/supergfxd.service --replace /usr/bin/supergfxd $out/bin/supergfxd