asusctl: 4.5.8 -> 4.6.2

This commit is contained in:
Alexandre Acebedo 2023-04-29 19:00:55 +02:00
parent 7319c3cf9a
commit 576d7d34c4
4 changed files with 971 additions and 1050 deletions

View File

@ -131,6 +131,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- `carnix` and `cratesIO` has been removed due to being unmaintained, use alternatives such as [naersk](https://github.com/nix-community/naersk) and [crate2nix](https://github.com/kolloch/crate2nix) instead. - `carnix` and `cratesIO` has been removed due to being unmaintained, use alternatives such as [naersk](https://github.com/nix-community/naersk) and [crate2nix](https://github.com/kolloch/crate2nix) instead.
- `services.asusd` configuration now uses strings instead of structured configuration, as upstream switched to the [RON](https://github.com/ron-rs/ron) configuration format. Support for structured configuration may return when [RON](https://github.com/ron-rs/ron) generation is implemented in nixpkgs.
- `checkInputs` have been renamed to `nativeCheckInputs`, because they behave the same as `nativeBuildInputs` when `doCheck` is set. `checkInputs` now denote a new type of dependencies, added to `buildInputs` when `doCheck` is set. As a rule of thumb, `nativeCheckInputs` are tools on `$PATH` used during the tests, and `checkInputs` are libraries which are linked to executables built as part of the tests. Similarly, `installCheckInputs` are renamed to `nativeInstallCheckInputs`, corresponding to `nativeBuildInputs`, and `installCheckInputs` are a new type of dependencies added to `buildInputs` when `doInstallCheck` is set. (Note that this change will not cause breakage to derivations with `strictDeps` unset, which are most packages except python, rust, ocaml and go packages). - `checkInputs` have been renamed to `nativeCheckInputs`, because they behave the same as `nativeBuildInputs` when `doCheck` is set. `checkInputs` now denote a new type of dependencies, added to `buildInputs` when `doCheck` is set. As a rule of thumb, `nativeCheckInputs` are tools on `$PATH` used during the tests, and `checkInputs` are libraries which are linked to executables built as part of the tests. Similarly, `installCheckInputs` are renamed to `nativeInstallCheckInputs`, corresponding to `nativeBuildInputs`, and `installCheckInputs` are a new type of dependencies added to `buildInputs` when `doInstallCheck` is set. (Note that this change will not cause breakage to derivations with `strictDeps` unset, which are most packages except python, rust, ocaml and go packages).
- `buildDunePackage` now defaults to `strictDeps = true` which means that any library should go into `buildInputs` or `checkInputs`. Any executable that is run on the building machine should go into `nativeBuildInputs` or `nativeCheckInputs` respectively. Example of executables are `ocaml`, `findlib` and `menhir`. PPXs are libraries which are built by dune and should therefore not go into `nativeBuildInputs`. - `buildDunePackage` now defaults to `strictDeps = true` which means that any library should go into `buildInputs` or `checkInputs`. Any executable that is run on the building machine should go into `nativeBuildInputs` or `nativeCheckInputs` respectively. Example of executables are `ocaml`, `findlib` and `menhir`. PPXs are libraries which are built by dune and should therefore not go into `nativeBuildInputs`.

View File

@ -2,8 +2,6 @@
let let
cfg = config.services.asusd; cfg = config.services.asusd;
json = pkgs.formats.json { };
toml = pkgs.formats.toml { };
in in
{ {
options = { options = {
@ -19,55 +17,55 @@ in
}; };
animeConfig = lib.mkOption { animeConfig = lib.mkOption {
type = json.type; type = lib.types.nullOr lib.types.str;
default = { }; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/anime.conf. The content of /etc/asusd/anime.ron.
See https://asus-linux.org/asusctl/#anime-control. See https://asus-linux.org/asusctl/#anime-control.
''; '';
}; };
asusdConfig = lib.mkOption { asusdConfig = lib.mkOption {
type = json.type; type = lib.types.nullOr lib.types.str;
default = { }; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/asusd.conf. The content of /etc/asusd/asusd.ron.
See https://asus-linux.org/asusctl/. See https://asus-linux.org/asusctl/.
''; '';
}; };
auraConfig = lib.mkOption { auraConfig = lib.mkOption {
type = json.type; type = lib.types.nullOr lib.types.str;
default = { }; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/aura.conf. The content of /etc/asusd/aura.ron.
See https://asus-linux.org/asusctl/#led-keyboard-control. See https://asus-linux.org/asusctl/#led-keyboard-control.
''; '';
}; };
profileConfig = lib.mkOption { profileConfig = lib.mkOption {
type = lib.types.nullOr lib.types.str; type = lib.types.nullOr lib.types.str;
default = ""; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/profile.conf. The content of /etc/asusd/profile.ron.
See https://asus-linux.org/asusctl/#profiles. See https://asus-linux.org/asusctl/#profiles.
''; '';
}; };
ledModesConfig = lib.mkOption { fanCurvesConfig = lib.mkOption {
type = lib.types.nullOr toml.type; type = lib.types.nullOr lib.types.str;
default = null; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/asusd-ledmodes.toml. Leave `null` to use default settings. The content of /etc/asusd/fan_curves.ron.
See https://asus-linux.org/asusctl/#led-keyboard-control. See https://asus-linux.org/asusctl/#fan-curves.
''; '';
}; };
userLedModesConfig = lib.mkOption { userLedModesConfig = lib.mkOption {
type = lib.types.nullOr toml.type; type = lib.types.nullOr lib.types.str;
default = null; default = null;
description = lib.mdDoc '' description = lib.mdDoc ''
The content of /etc/asusd/asusd-user-ledmodes.toml. The content of /etc/asusd/asusd-user-ledmodes.ron.
See https://asus-linux.org/asusctl/#led-keyboard-control. See https://asus-linux.org/asusctl/#led-keyboard-control.
''; '';
}; };
@ -79,26 +77,18 @@ in
environment.etc = environment.etc =
let let
maybeConfig = name: cfg: lib.mkIf (cfg != { }) { maybeConfig = name: cfg: lib.mkIf (cfg != null) {
source = json.generate name cfg; source = pkgs.writeText name cfg;
mode = "0644"; mode = "0644";
}; };
in in
{ {
"asusd/anime.conf" = maybeConfig "anime.conf" cfg.animeConfig; "asusd/anime.ron" = maybeConfig "anime.ron" cfg.animeConfig;
"asusd/asusd.conf" = maybeConfig "asusd.conf" cfg.asusdConfig; "asusd/asusd.ron" = maybeConfig "asusd.ron" cfg.asusdConfig;
"asusd/aura.conf" = maybeConfig "aura.conf" cfg.auraConfig; "asusd/aura.ron" = maybeConfig "aura.ron" cfg.auraConfig;
"asusd/profile.conf" = lib.mkIf (cfg.profileConfig != null) { "asusd/profile.conf" = maybeConfig "profile.ron" cfg.profileConfig;
source = pkgs.writeText "profile.conf" cfg.profileConfig; "asusd/fan_curves.ron" = maybeConfig "fan_curves.ron" cfg.fanCurvesConfig;
mode = "0644"; "asusd/asusd_user_ledmodes.ron" = maybeConfig "asusd_user_ledmodes.ron" cfg.userLedModesConfig;
};
"asusd/asusd-ledmodes.toml" = {
source =
if cfg.ledModesConfig == null
then "${pkgs.asusctl}/share/asusd/data/asusd-ledmodes.toml"
else toml.generate "asusd-ledmodes.toml" cfg.ledModesConfig;
mode = "0644";
};
}; };
services.dbus.enable = true; services.dbus.enable = true;

File diff suppressed because it is too large Load Diff

View File

@ -13,32 +13,31 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "asusctl"; pname = "asusctl";
version = "4.5.8"; version = "4.6.2";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "asus-linux"; owner = "asus-linux";
repo = "asusctl"; repo = "asusctl";
rev = version; rev = version;
hash = "sha256-6AitRpyLIq5by9/rXdIC8AChMVKZmR1Eo5GTo+DtGhc="; hash = "sha256-qfl8MUSHjqlSnsaudoRD9fY5TM9zgy7L7DA+pctn/nc=";
}; };
cargoHash = "";
cargoLock = { cargoLock = {
lockFile = ./Cargo.lock; lockFile = ./Cargo.lock;
outputHashes = { outputHashes = {
"ecolor-0.20.0" = "sha256-tnjFkaCWmCPGw3huQN9VOAeiH+zk3Zk9xYoRKmg2WQg="; "ecolor-0.21.0" = "sha256-m7eHX6flwO21umtx3dnIuVUnNsEs3ZCyOk5Vvp/lVfI=";
"notify-rust-4.6.0" = "sha256-jhCgisA9f6AI9e9JQUYRtEt47gQnDv5WsdRKFoKvHJs="; "notify-rust-4.6.0" = "sha256-jhCgisA9f6AI9e9JQUYRtEt47gQnDv5WsdRKFoKvHJs=";
"supergfxctl-5.0.2" = "sha256-zp92mWyWUEWUP4kEyHbiUyYTtp2kLv+gxkPzOu77fi8="; "supergfxctl-5.1.1" = "sha256-AThaZ9dp5T/DtLPE6gZ9qgkw0xksiq+VCL9Y4G41voE=";
}; };
}; };
postPatch = '' postPatch = ''
files=" files="
daemon/src/config.rs
daemon/src/ctrl_anime/config.rs
daemon-user/src/daemon.rs daemon-user/src/daemon.rs
daemon-user/src/ctrl_anime.rs daemon-user/src/config.rs
daemon-user/src/user_config.rs
rog-control-center/src/main.rs rog-control-center/src/main.rs
rog-aura/src/aura_detection.rs
" "
for file in $files; do for file in $files; do
substituteInPlace $file --replace /usr/share $out/share substituteInPlace $file --replace /usr/share $out/share
@ -63,23 +62,7 @@ rustPlatform.buildRustPackage rec {
doCheck = false; doCheck = false;
postInstall = '' postInstall = ''
install -Dm444 -t $out/share/dbus-1/system.d/ data/asusd.conf make prefix=$out install-data
install -Dm444 -t $out/share/rog-gui/layouts/ rog-aura/data/layouts/*
install -Dm444 -t $out/share/applications/ rog-control-center/data/rog-control-center.desktop
install -Dm444 -t $out/share/icons/hicolor/512x512/apps/ rog-control-center/data/rog-control-center.png data/icons/asus_notif_*
install -Dm444 -t $out/share/icons/hicolor/scalable/status/ data/icons/scalable/*
install -Dm444 -t $out/share/asusd/anime/asus/rog/ rog-anime/data/anime/asus/rog/Sunset.gif
install -Dm444 -t $out/share/asusd/anime/asus/gaming/ rog-anime/data/anime/asus/gaming/Controller.gif
install -Dm444 -t $out/share/asusd/anime/custom/ rog-anime/data/anime/custom/*
install -Dm444 -t $out/share/asusd/data/ data/asusd-ledmodes.toml
install -Dm444 data/asusd.rules $out/lib/udev/rules.d/99-asusd.rules
install -Dm444 -t $out/share/dbus-1/system.d/ data/asusd.conf
install -Dm444 -t $out/lib/systemd/system/ data/asusd.service
install -Dm444 -t $out/lib/systemd/user/ data/asusd-user.service
''; '';
postFixup = '' postFixup = ''