1;; SPDX-FileCopyrightText: 2025 Sören Tempel <soeren+git@soeren-tempel.net>
2;;
3;; SPDX-License-Identifier: GPL-3.0-only
4
5(define-module (quebex-packages)
6 #:use-module (guix) ; XXX: this helps 'current-source-directory'
7 #:use-module ((guix licenses) #:prefix license:)
8 #:use-module (gnu packages c)
9 #:use-module (gnu packages haskell)
10 #:use-module (gnu packages haskell-apps)
11 #:use-module (gnu packages haskell-check)
12 #:use-module (gnu packages maths)
13 #:use-module (guix build-system haskell)
14 #:use-module (guix download)
15 #:use-module (guix gexp)
16 #:use-module (guix git-download)
17 #:use-module (guix packages))
18
19(define-public ghc-simple-smt
20 (package
21 (name "ghc-simple-smt")
22 (version "0.9.8")
23 (source
24 (origin
25 (method url-fetch)
26 (uri (hackage-uri "simple-smt" version))
27 (sha256
28 (base32 "0imimkpzbd013gadkg7sc05jr70lffaij4ijzk368iw8xgvgxyf9"))))
29 (build-system haskell-build-system)
30 (properties '((upstream-name . "simple-smt")))
31 (home-page "https://github.com/yav/simple-smt")
32 (synopsis "Simple way to interact with an SMT solver process.")
33 (description
34 "This package provides a simple way to interact with an SMT solver process.")
35 (license license:bsd-3)))
36
37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38
39(define %srcdir
40 (string-append (current-source-directory) "/../.."))
41
42(define-public quebex-syntax
43 (package
44 (name "quebex-syntax")
45 (version "0.1.0.0")
46 (source (local-file (string-append %srcdir "/quebex-syntax")
47 "git-checkout"
48 #:recursive? #t))
49 (build-system haskell-build-system)
50 (inputs (list ghc-9.2))
51 (native-inputs
52 (list
53 qbe
54 ghc-tasty
55 ghc-tasty-hunit
56 ghc-tasty-golden))
57 (synopsis "Parser library for the QBE intermediate language")
58 (description "")
59 (home-page "https://git.8pit.net/quebex")
60 (license (list license:expat license:bsd-2 license:gpl3))))
61
62(define-public quebex
63 (package
64 (name "quebex")
65 (version "0.1.0.0")
66 (source (local-file (string-append %srcdir "/quebex")
67 "git-checkout"
68 #:recursive? #t))
69 (build-system haskell-build-system)
70 (inputs (list ghc-9.2))
71 (native-inputs
72 (list
73 quebex-syntax
74 ghc-tasty
75 ghc-tasty-hunit))
76 (synopsis "Analysis library for the QBE intermediate language")
77 (description "")
78 (home-page "https://git.8pit.net/quebex")
79 (license (list license:expat license:gpl3))))
80
81(define-public quebex-symex
82 (package
83 (name "quebex-symex")
84 (version "0.1.0.0")
85 (source (local-file (string-append %srcdir "/quebex-symex")
86 "git-checkout"
87 #:recursive? #t))
88 (build-system haskell-build-system)
89 (inputs (list ghc-9.2))
90 (native-inputs
91 (list
92 quebex
93 quebex-syntax
94 ghc-tasty
95 ghc-tasty-hunit
96 ghc-tasty-golden
97 ghc-simple-smt
98 z3))
99 (synopsis "Symbolic executor for the QBE intermediate language")
100 (description "")
101 (home-page "https://git.8pit.net/quebex")
102 (license (list license:expat license:gpl3))))