depot/third_party/nixpkgs/pkgs/servers/klipper/klipper-genconf.nix
Default email a71eb02b76 Project import generated by Copybara.
GitOrigin-RevId: a115bb9bd56831941be3776c8a94005867f316a7
2022-11-27 10:42:12 +01:00

21 lines
452 B
Nix

{ 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
'';
}