Commit 576d7d34 authored by Alexandre Acebedo's avatar Alexandre Acebedo
Browse files

asusctl: 4.5.8 -> 4.6.2

parent 7319c3cf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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.

- `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).

- `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`.
+27 −37
Original line number Diff line number Diff line
@@ -2,8 +2,6 @@

let
  cfg = config.services.asusd;
  json = pkgs.formats.json { };
  toml = pkgs.formats.toml { };
in
{
  options = {
@@ -19,55 +17,55 @@ in
      };

      animeConfig = lib.mkOption {
        type = json.type;
        default = { };
        type = lib.types.nullOr lib.types.str;
        default = null;
        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.
        '';
      };

      asusdConfig = lib.mkOption {
        type = json.type;
        default = { };
        type = lib.types.nullOr lib.types.str;
        default = null;
        description = lib.mdDoc ''
          The content of /etc/asusd/asusd.conf.
          The content of /etc/asusd/asusd.ron.
          See https://asus-linux.org/asusctl/.
        '';
      };

      auraConfig = lib.mkOption {
        type = json.type;
        default = { };
        type = lib.types.nullOr lib.types.str;
        default = null;
        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.
        '';
      };

      profileConfig = lib.mkOption {
        type = lib.types.nullOr lib.types.str;
        default = "";
        default = null;
        description = lib.mdDoc ''
          The content of /etc/asusd/profile.conf.
          The content of /etc/asusd/profile.ron.
          See https://asus-linux.org/asusctl/#profiles.
        '';
      };

      ledModesConfig = lib.mkOption {
        type = lib.types.nullOr toml.type;
      fanCurvesConfig = lib.mkOption {
      type = lib.types.nullOr lib.types.str;
      default = null;
      description = lib.mdDoc ''
          The content of /etc/asusd/asusd-ledmodes.toml. Leave `null` to use default settings.
          See https://asus-linux.org/asusctl/#led-keyboard-control.
          The content of /etc/asusd/fan_curves.ron.
          See https://asus-linux.org/asusctl/#fan-curves.
        '';
      };

      userLedModesConfig = lib.mkOption {
        type = lib.types.nullOr toml.type;
        type = lib.types.nullOr lib.types.str;
        default = null;
        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.
        '';
      };
@@ -79,26 +77,18 @@ in

    environment.etc =
      let
        maybeConfig = name: cfg: lib.mkIf (cfg != { }) {
          source = json.generate name cfg;
        maybeConfig = name: cfg: lib.mkIf (cfg != null) {
          source = pkgs.writeText name cfg;
          mode = "0644";
        };
      in
      {
        "asusd/anime.conf" = maybeConfig "anime.conf" cfg.animeConfig;
        "asusd/asusd.conf" = maybeConfig "asusd.conf" cfg.asusdConfig;
        "asusd/aura.conf" = maybeConfig "aura.conf" cfg.auraConfig;
        "asusd/profile.conf" = lib.mkIf (cfg.profileConfig != null) {
          source = pkgs.writeText "profile.conf" cfg.profileConfig;
          mode = "0644";
        };
        "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";
        };
        "asusd/anime.ron" = maybeConfig "anime.ron" cfg.animeConfig;
        "asusd/asusd.ron" = maybeConfig "asusd.ron" cfg.asusdConfig;
        "asusd/aura.ron" = maybeConfig "aura.ron" cfg.auraConfig;
        "asusd/profile.conf" = maybeConfig "profile.ron" cfg.profileConfig;
        "asusd/fan_curves.ron" = maybeConfig "fan_curves.ron" cfg.fanCurvesConfig;
        "asusd/asusd_user_ledmodes.ron" = maybeConfig "asusd_user_ledmodes.ron" cfg.userLedModesConfig;
      };

    services.dbus.enable = true;
+921 −975

File changed.

Preview size limit exceeded, changes collapsed.

+8 −25
Original line number Diff line number Diff line
@@ -13,32 +13,31 @@

rustPlatform.buildRustPackage rec {
  pname = "asusctl";
  version = "4.5.8";
  version = "4.6.2";

  src = fetchFromGitLab {
    owner = "asus-linux";
    repo = "asusctl";
    rev = version;
    hash = "sha256-6AitRpyLIq5by9/rXdIC8AChMVKZmR1Eo5GTo+DtGhc=";
    hash = "sha256-qfl8MUSHjqlSnsaudoRD9fY5TM9zgy7L7DA+pctn/nc=";
  };

  cargoHash = "";
  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "ecolor-0.20.0" = "sha256-tnjFkaCWmCPGw3huQN9VOAeiH+zk3Zk9xYoRKmg2WQg=";
      "ecolor-0.21.0" = "sha256-m7eHX6flwO21umtx3dnIuVUnNsEs3ZCyOk5Vvp/lVfI=";
      "notify-rust-4.6.0" = "sha256-jhCgisA9f6AI9e9JQUYRtEt47gQnDv5WsdRKFoKvHJs=";
      "supergfxctl-5.0.2" = "sha256-zp92mWyWUEWUP4kEyHbiUyYTtp2kLv+gxkPzOu77fi8=";
      "supergfxctl-5.1.1" = "sha256-AThaZ9dp5T/DtLPE6gZ9qgkw0xksiq+VCL9Y4G41voE=";
    };
  };

  postPatch = ''
    files="
      daemon/src/config.rs
      daemon/src/ctrl_anime/config.rs
      daemon-user/src/daemon.rs
      daemon-user/src/ctrl_anime.rs
      daemon-user/src/user_config.rs
      daemon-user/src/config.rs
      rog-control-center/src/main.rs
      rog-aura/src/aura_detection.rs
    "
    for file in $files; do
      substituteInPlace $file --replace /usr/share $out/share
@@ -63,23 +62,7 @@ rustPlatform.buildRustPackage rec {
  doCheck = false;

  postInstall = ''
    install -Dm444 -t $out/share/dbus-1/system.d/ data/asusd.conf
    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
    make prefix=$out install-data
  '';

  postFixup = ''