Subject: [bug#77371] [PATCH 04/12] gnu: Add python-deflate.

From: Vinicius Monego <[email-masked]>
Date: Sat, 29 Mar 2025 23:00:57 +0000

* gnu/packages/python-compression.scm (python-deflate): New variable.

Change-Id: I7b04deb2ed291cff1e36422b8e4bf127a0575d08
---
 gnu/packages/python-compression.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/python-compression.scm b/gnu/packages/python-compression.scm
index 5b994d408f..427d3a7464 100644
--- a/gnu/packages/python-compression.scm
+++ b/gnu/packages/python-compression.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2024 TakeV <[email-masked]>
 ;;; Copyright © 2023 Ivan Vilata i Balaguer <[email-masked]>
 ;;; Copyright © 2024 Maxim Cournoyer <[email-masked]>
+;;; Copyright © 2025 Vinicius Monego <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -788,6 +789,32 @@ (define-public python-zipp
 wrapper.  It provides a backport of the @code{Path} object.")
     (license license:expat)))
 
+(define-public python-deflate
+  (package
+    (name "python-deflate")
+    (version "0.7.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "deflate" version))
+       (sha256
+        (base32 "1vnwyzlq5q73g6qj6gcl95ma1zxdx875zkc1n5aiyy8jjvzyxdfh"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:phases #~(modify-phases %standard-phases
+                   (add-after 'unpack 'libdeflate-prefix
+                     (lambda _
+                       (setenv "LIBDEFLATE_PREFIX"
+                               #$(this-package-input "libdeflate")))))))
+    (native-inputs (list cmake-minimal python-pytest python-scikit-build-core))
+    (inputs (list libdeflate))
+    (home-page "https://github.com/dcwatson/deflate")
+    (synopsis "Python wrapper for @code{libdeflate}")
+    (description "This packages contains a very thin Python wrapper for
+@code{libdeflate}.")
+    (license license:expat)))
+
 (define-public python-zipstream-ng
   (package
     (name "python-zipstream-ng")
-- 
2.49.0