about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2025-06-02 13:49:31 +0900
committerNguyễn Gia Phong <cnx@loang.net>2025-06-02 13:49:31 +0900
commit83f7af4132a3e9ac0ea47db767bae29b98f2dd0b (patch)
treea7becbe1f24a4fc24add9b812fe60f6b6f11442f
parentdfe3df4fb6ab3292fc1827ebb5f7e8a067c7caf5 (diff)
downloadloftix-83f7af4132a3e9ac0ea47db767bae29b98f2dd0b.tar.gz
Package python-apted
-rw-r--r--loftix/patching.scm30
1 files changed, 29 insertions, 1 deletions
diff --git a/loftix/patching.scm b/loftix/patching.scm
index 8b50e6e..ccdcad2 100644
--- a/loftix/patching.scm
+++ b/loftix/patching.scm
@@ -1,6 +1,6 @@
 ;;; Packages for software patching
 ;;;
-;;; SPDX-FileCopyrightText: 2024 Nguyễn Gia Phong
+;;; SPDX-FileCopyrightText: 2024-2025 Nguyễn Gia Phong
 ;;; SPDX-License-Identifier: GPL-3.0-or-later
 
 (define-module (loftix patching)
@@ -11,6 +11,7 @@
   #:use-module (gnu packages markup)
   #:use-module (gnu packages vim)
   #:use-module (guix build-system gnu)
+  #:use-module (guix build-system python)
   #:use-module (guix gexp)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
@@ -63,3 +64,30 @@ E9Patch is:
 @end itemize")
     (license (list license:expat ;src/e9patch/e9loader_*.cpp
                    license:gpl3+)))) ;rest
+
+(define-public python-apted
+  (let ((commit "828b3e3f4c053f7d35f0b55b0d5597e8041719ac")
+        (revision "0"))
+    (package
+      (name "python-apted")
+      (version (git-version "1.0.3" revision commit))
+      (home-page "https://github.com/JoaoFelipe/apted")
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference (url home-page)
+                             (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1vw1sbn41cysmhr4ib58cw3hzs1xjxwb1d8r1yhrqgjk5q6ckjw7"))))
+      (build-system python-build-system)
+      (arguments
+       (list #:phases #~(modify-phases %standard-phases
+                          (replace 'check
+                            (lambda* (#:key tests? #:allow-other-keys)
+                              (when tests?
+                                (invoke "python" "-m" "unittest")))))))
+      (synopsis "APTED algorithm for the Tree Edit Distance")
+      (description "This is a Python implementation of the APTED algorithm,
+which supersedes the RTED algorithm for computing the tree edit distance.")
+      (license license:expat))))