diff mbox series

[bug#50987,2/2] gnu: Add python-sl1tophoton.

Message ID 4Ru7g6bih3h2SgDG2izfiqmCEcySJ3xMOcvEtcn7fGoeBhTPYjYvgW8wnK77o7nrGnaILCrMu949HnZwEpEmGsw0UWtmOCHIlYFMJA0OIkg=@protonmail.com
State New
Headers show
Series [bug#50987,1/2] gnu: Add python-pyphotonfile. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

phodina Oct. 3, 2021, 7:43 a.m. UTC
* gnu/packages/python-xyz.scm (python-sl1tophoton): New variable.

--
2.32.0

Comments

phodina Oct. 3, 2021, 7:48 a.m. UTC | #1
Hi Guix,

these patches allow users to use Prusa Slicer to slice the model and convert it to the format for the appropriate HW instead of using proprietary software.

However, there is one issue with the patch in python-sl1tophoton. In the install phase it crates the executables in gnu/store/xxxxx/bin but it attempts to launch them as a shell script instead of python.

Do you know how to fix that?
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 5f4df4c7fb..0c56c61946 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -547,6 +547,43 @@  Markdown.  All extensions are found under the module namespace of pymdownx.")
 generator MkDocs.")
     (license license:expat)))

+(define-public python-sl1tophoton
+  (package
+    (name "python-sl1tophoton")
+    (version "0.1.3")
+    (source
+      (origin
+        (method git-fetch)
+        (uri (git-reference
+               (url "https://github.com/fookatchu/SL1toPhoton")
+               (commit (string-append "v" version))))
+        (file-name (git-file-name name version))
+        (sha256
+          (base32
+            "1hmb74rcky3nax4lxn7pw6lcd5a66fdbwrm11c84zb31xb51bakw"))))
+    (build-system python-build-system)
+    (arguments
+      `(#:phases
+         (modify-phases %standard-phases
+           (add-after 'install 'install-binary
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let* ((bin (string-append (assoc-ref outputs "out") "/bin")))
+                 (mkdir-p bin)
+                 (install-file "SL1_to_Photon_gui.py" bin)
+                 (install-file "SL1_to_Photon.py" bin)
+                 (chmod (string-append bin "/SL1_to_Photon_gui.py") #o555)
+                 (chmod (string-append bin "/SL1_to_Photon.py") #o555)))))))
+    (inputs `(("python-pyphotonfile", python-pyphotonfile)
+              ("python-numpy" ,python-numpy)
+              ("python-pyside-2" ,python-pyside-2)
+              ("python-pillow" ,python-pillow)))
+    (home-page "https://github.com/fookatchu/SL1toPhoton")
+    (synopsis "Converter for SL1 to Photon files")
+    (description "SL1toPhoton is a tool for converting PrusaSlicer's SL1 files
+to Photon files for the Anycubic Photon 3D-Printer.  Other cbddlp-files should
+also work (e.G. Elegoo Mars).")
+    (license license:gpl3)))
+
 (define-public python-slixmpp
   (package
     (name "python-slixmpp")