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

auto-cpufreq: init at 1.5.1 #106985

Merged
merged 2 commits into from Jan 8, 2021
Merged

auto-cpufreq: init at 1.5.1 #106985

merged 2 commits into from Jan 8, 2021

Conversation

Technical27
Copy link
Contributor

Motivation for this change

I wanted to use auto-cpufreq and so do others AdnanHodzic/auto-cpufreq#130

Things done

Create the auto-cpufreq package and add myself to maintainers

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

There really needs to be a NixOS module, but I will work on it after this gets merged.
Here is a temporary solution to get the systemd service:

environment.systemPackages = [ pkgs.auto-cpufreq ];

systemd.services.auto-cpufreq = {
    description = "auto-cpufreq - Automatic CPU speed & power optimizer for Linux";
    after = [ "network.target" "network-online.target" ];
    unitConfig.ConditionPathExists = "/var/log/auto-cpufreq.log";
    path = with pkgs; [ ncurses bash ];
    serviceConfig = {
      Type = "simple";
      User = "root";
      ExecStart = "${pkgs.auto-cpufreq}/bin/auto-cpufreq --daemon";
      StandardOutput = "append:/var/log/auto-cpufreq.log";
    };
    wantedBy = [ "multi-user.target" ];
  };
};

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/416

@SuperSandro2000
Copy link
Member

Result of nixpkgs-review pr 106985 run on x86_64-linux 1

1 package built:
  • autocpu-freq
autocpu-freq.log
143:Ran 0 tests in 0.000s

Add doCheck = false; and a pythonImportsCheck.

Comment on lines +20 to +24
# copy script manually
cp ${src}/scripts/cpufreqctl.sh $out/bin/cpufreqctl
Copy link
Contributor

Choose a reason for hiding this comment

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

Compared to install() it seems to me that the installation is incomplete (missed the font install and polkit policy). Doesn't this make this program miss some features 🤔 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that this script was copied from this repo. Those files don't even exist in anywhere in auto-cpufreq, but they do exist in the other project.

@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 106985 1

1 package built:
  • autocpu-freq

@Technical27
Copy link
Contributor Author

@SuperSandro2000 added and squashed.

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review. If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 106985 run on x86_64-linux 1

1 package built:
  • autocpu-freq

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/329

@AndersonTorres AndersonTorres merged commit 69534f3 into NixOS:master Jan 8, 2021
@Technical27 Technical27 mentioned this pull request Jan 12, 2021
10 tasks
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.

None yet

5 participants