From 9e1f27272aef75525c40709b403d3cf02ce7f39f Mon Sep 17 00:00:00 2001 From: Matei Dibu Date: Thu, 25 Jul 2024 17:06:40 +0300 Subject: [PATCH] klipper: add version info (#329140) --- pkgs/servers/klipper/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix index 81d79121c6da..78d78f03e417 100644 --- a/pkgs/servers/klipper/default.nix +++ b/pkgs/servers/klipper/default.nix @@ -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