depot/third_party/nixpkgs/pkgs/servers/klipper/klipper-genconf.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

21 lines
452 B
Nix

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