about summary refs log tree commit diff
path: root/pkgs/servers/klipper
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2022-09-20 13:51:27 +0200
committerGitHub <noreply@github.com>2022-09-20 13:51:27 +0200
commitd8646a704e06c298738eab6bdc9e0361a98d816b (patch)
tree4e11c953a8adacdfdf2c03f4d059e283f01d8c1d /pkgs/servers/klipper
parentca6e8db877a276d4b5a2794d2cb8cfd961bd65fd (diff)
klipper: patchPhase -> postPatch, little cleanups
Diffstat (limited to 'pkgs/servers/klipper')
-rw-r--r--pkgs/servers/klipper/default.nix14
1 files changed, 8 insertions, 6 deletions
diff --git a/pkgs/servers/klipper/default.nix b/pkgs/servers/klipper/default.nix
index cc2f635e62014..3ca708e5f4edf 100644
--- a/pkgs/servers/klipper/default.nix
+++ b/pkgs/servers/klipper/default.nix
@@ -4,6 +4,7 @@
 , python3
 , unstableGitUpdater
 }:
+
 stdenv.mkDerivation rec {
   pname = "klipper";
   version = "unstable-2022-09-11";
@@ -23,13 +24,14 @@ stdenv.mkDerivation rec {
   buildInputs = [ (python3.withPackages (p: with p; [ cffi pyserial greenlet jinja2 markupsafe ])) ];
 
   # we need to run this to prebuild the chelper.
-  postBuild = "python ./chelper/__init__.py";
+  postBuild = ''
+    python ./chelper/__init__.py
+  '';
 
-  # 2022-06-28: Python 3 is already supported in klipper, alas shebangs remained
-  # the same - we replace them in patchPhase.
-  patchPhase = ''
-    for F in klippy.py console.py parsedump.py; do
-      substituteInPlace $F \
+  # Python 3 is already supported but shebangs aren't updated yet
+  postPatch = ''
+    for file in klippy.py console.py parsedump.py; do
+      substituteInPlace $file \
         --replace '/usr/bin/env python2' '/usr/bin/env python'
     done
   '';