summaryrefslogtreecommitdiff
path: root/gnu/packages/maths.scm
diff options
context:
space:
mode:
authorLiliana Marie Prikler <liliana.prikler@gmail.com>2023-10-12 19:26:29 +0200
committerLiliana Marie Prikler <liliana.prikler@gmail.com>2023-10-15 12:28:19 +0200
commitf0a01ff42afd5862a42aa2c6a9aba57061001def (patch)
tree42cd3c0bd8ae04eaabb8ba28c5cfca3f438839de /gnu/packages/maths.scm
parentf45114f38e50d16560c78599abff892ef89e4ccb (diff)
gnu: Add fast-downward.
* gnu/packages/maths.scm (fast-downward): New variable.
Diffstat (limited to 'gnu/packages/maths.scm')
-rw-r--r--gnu/packages/maths.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 5ca7a16a1d..e9c77a2061 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -3179,6 +3179,61 @@ This is the certified version of the Open Cascade Technology (OCCT) library.")
;; File src/NCollection/NCollection_StdAllocator.hxx:
license:public-domain))))
+(define-public fast-downward
+ (package
+ (name "fast-downward")
+ (version "23.06.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aibasel/downward")
+ (commit (string-append "release-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1xrgnvbkzkdf6srbrlsnf4qrgp0f1lkk7yxf34ynna0w49l468d4"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list
+ #:tests? #f ; no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-driver
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "driver/run_components.py"
+ ;; strip gratuitous "bin"
+ (("os\\.path\\.join\\((.*), \"bin\"\\)" all keep)
+ (string-append "os.path.join(" keep ")")))))
+ (add-before 'configure 'chdir
+ (lambda _ (chdir "src")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (dest (string-append out "/libexec/fast-downward"
+ "/builds/release")))
+ (mkdir-p dest)
+ (with-directory-excursion "bin"
+ (install-file "downward" dest)
+ (copy-recursively "translate"
+ (string-append dest "/translate"))))))
+ (add-after 'install 'install-driver
+ (lambda* (#:key outputs #:allow-other-keys)
+ (with-directory-excursion ".."
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin/fast-downward"))
+ (dest (string-append out "/libexec/fast-downward")))
+ (copy-recursively "driver"
+ (string-append dest "/driver"))
+ (mkdir-p (dirname bin))
+ (copy-file "fast-downward.py" bin)
+ (wrap-program bin
+ `("PYTHONPATH" prefix (,dest))))))))))
+ (inputs (list bash-minimal python))
+ (home-page "https://www.fast-downward.org/")
+ (synopsis "Domain-independant classical planning system")
+ (description "Fast Downward is a portfolio-based planning system that
+supports the propositional fragment of PDDL2.2.")
+ (license license:gpl3+)))
+
(define-public gmsh
(package
(name "gmsh")