Skip to content

Commit

Permalink
adjustor: refactor
Browse files Browse the repository at this point in the history
  Refactored adjustor to be more similar to handheld-daemon
  • Loading branch information
toast003 committed Dec 21, 2024
1 parent cf5988c commit ba8c6c7
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions pkgs/by-name/ad/adjustor/package.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
fetchFromGitHub,
lib,
python3,
python3Packages,

# Dependencies
kmod,
util-linux,
}:
python3.pkgs.buildPythonApplication rec {
python3Packages.buildPythonPackage rec {
pname = "adjustor";
version = "3.6.1";
pyproject = true;
Expand All @@ -15,13 +19,28 @@ python3.pkgs.buildPythonApplication rec {
hash = "sha256-A5IdwuhsK9umMtsUR7CpREGxbTYuJNPV4MT+6wqcWT8=";
};

propagatedBuildInputs = with python3.pkgs; [
# This package relies on several programs expected to be on the user's PATH.
# We take a more reproducible approach by patching the absolute path to each of these required
# binaries.
postPatch = ''
substituteInPlace src/adjustor/core/acpi.py \
--replace-fail '"modprobe"' '"${lib.getExe' kmod "modprobe"}"'
substituteInPlace src/adjustor/fuse/utils.py \
--replace-fail 'f"mount' 'f"${lib.getExe' util-linux "mount"}'
'';

build-system = with python3Packages; [
setuptools
];

dependencies = with python3Packages; [
rich
pyroute2
fuse
pygobject3
dbus-python
kmod
];

# This package doesn't have upstream tests.
Expand Down

0 comments on commit ba8c6c7

Please sign in to comment.