mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 16:23:26 +00:00
22 lines
452 B
Nix
22 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
|
|
'';
|
|
}
|