summary refs log blame commit diff
path: root/pkgs/servers/klipper/klipper-genconf.nix
blob: d810bccd4366d281d2c4dd3570de7076892b3eaf (plain) (tree)
1
2
3
4
5
6
7
8
9

                       
         




                           
           
                           
           



                      
                                                                                     




                                                           
{ writeShellApplication
, klipper
, python3
, gnumake
, pkgsCross
}: writeShellApplication {
  name = "klipper-genconf";
  runtimeInputs = [
    python3
    pkgsCross.avr.stdenv.cc
    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
  '';
}