depot/third_party/nixpkgs/pkgs/servers/klipper/klipper-genconf.nix
Default email c7f94ff3ce Project import generated by Copybara.
GitOrigin-RevId: b85ed9dcbf187b909ef7964774f8847d554fab3b
2023-08-22 22:05:09 +02:00

19 lines
412 B
Nix

{ writeShellApplication
, klipper
, python3
, gnumake
}: writeShellApplication {
name = "klipper-genconf";
runtimeInputs = [
python3
gnumake
];
text = ''
CURRENT_DIR=$(pwd)
TMP=$(mktemp -d)
make -C ${klipper.src} OUT="$TMP" KCONFIG_CONFIG="$CURRENT_DIR/config" menuconfig
rm -rf "$TMP" config.old
printf "\nYour firmware configuration for klipper:\n\n"
cat config
'';
}