mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 17:14:33 +00:00
20 lines
412 B
Nix
20 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
|
|
'';
|
|
}
|