Files
nixpkgs/pkgs/by-name/fw/fw-fanctrl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

44 lines
1.3 KiB
Nix

{
lib,
python3Packages,
fw-ectool,
fetchFromGitHub,
}:
python3Packages.buildPythonPackage rec {
pname = "fw-fanctrl";
version = "1.0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "TamtamHero";
repo = "fw-fanctrl";
tag = "v${version}";
hash = "sha256-lwuBbyJnWUAXkKemhsdx73fAzO2QX2n81az074hGkzI=";
};
build-system = [ python3Packages.setuptools ];
dependencies = [ python3Packages.jsonschema ];
makeWrapperArgs = [ "--prefix PATH : ${lib.makeBinPath [ fw-ectool ]}" ];
postInstall = ''
mkdir -p $out/share/fw-fanctrl
install -m 644 $src/src/fw_fanctrl/_resources/config.json $out/share/fw-fanctrl/config.json
install -m 755 $src/services/system-sleep/fw-fanctrl-suspend $out/share/fw-fanctrl/fw-fanctrl-suspend
patchShebangs --build $out/share/fw-fanctrl/fw-fanctrl-suspend
substituteInPlace $out/share/fw-fanctrl/fw-fanctrl-suspend \
--replace-fail '"%PYTHON_SCRIPT_INSTALLATION_PATH%"' $out/bin/fw-fanctrl
'';
meta = {
mainProgram = "fw-fanctrl";
homepage = "https://github.com/TamtamHero/fw-fanctrl";
description = "Simple systemd service to better control Framework Laptop's fan(s)";
platforms = lib.platforms.linux;
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.Svenum ];
};
}