Files
nix-files/hosts/common/programs/fftest.nix
Colin ae2f2c47a4 fftest: simplify
upstream SDL cross compiles now, so the original comment doesn't apply
2025-07-22 22:11:20 +00:00

27 lines
875 B
Nix

# fftest can test the haptics/vibrator on a phone:
# - `fftest /dev/input/by-path/platform-vibrator-event`
{ pkgs, ... }:
let
fftestOnly = pkgs.linkBinIntoOwnPackage pkgs.linuxConsoleTools "fftest";
#
# XXX(2025-03-24): upstream `linuxConsoleTools` depends on SDL, which doesn't cross compile.
# but `fftest` component doesn't use SDL, so if we build only that then it can cross compile:
# fftestOnly = pkgs.linuxConsoleTools.overrideAttrs (upstream: {
# buildInputs = [ ]; #< disable SDL
# buildFlags = (upstream.buildFlags or []) ++ [
# "-C" "utils" "fftest"
# ];
# installPhase = ''
# install -Dm755 utils/fftest $out/bin/fftest
# install -Dm644 docs/fftest.1 $out/share/man/man1/fftest.1
# '';
# });
in
{
sane.programs.fftest = {
packageUnwrapped = fftestOnly;
sandbox.autodetectCliPaths = "existing";
};
}