klipper: add version info (#329140)

This commit is contained in:
Matei Dibu 2024-07-25 17:06:40 +03:00 committed by GitHub
parent 9cce3a7dfd
commit 9e1f27272a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,6 +57,10 @@ stdenv.mkDerivation rec {
cp -r $src/docs $out/lib/docs
cp -r $src/config $out/lib/config
# Add version information. For the normal procedure see https://www.klipper3d.org/Packaging.html#versioning
# This is done like this because scripts/make_version.py is not available when sourceRoot is set to "${src.name}/klippy"
echo "${version}-NixOS" > $out/lib/klipper/.version
mkdir -p $out/bin
chmod 755 $out/lib/klipper/klippy.py
makeWrapper $out/lib/klipper/klippy.py $out/bin/klippy --chdir $out/lib/klipper