summaryrefslogtreecommitdiff
path: root/packages/komodo
diff options
context:
space:
mode:
Diffstat (limited to 'packages/komodo')
-rw-r--r--packages/komodo/libsodium.scm81
1 files changed, 81 insertions, 0 deletions
diff --git a/packages/komodo/libsodium.scm b/packages/komodo/libsodium.scm
new file mode 100644
index 0000000..acecfd4
--- /dev/null
+++ b/packages/komodo/libsodium.scm
@@ -0,0 +1,81 @@
+(define-module (libsodium)
+ #:use-module (gnu packages crypto)
+ #:use-module (guix build utils)
+ #:use-module (guix build-system cmake)
+ #:use-module (guix git-download)
+ #:use-module (guix packages)
+ #:use-module (komodo-vcpkg-ports))
+
+;; DATA LAYER
+
+(define hash
+ (base32 "0yk9pyj7bl421hb20lg9yaysqvcgrk7860613674la0gk5glq34d"))
+
+(define inputs
+ (list komodo-vcpkg-ports))
+
+(define name
+ "libsodium-komodo")
+
+(define tests?
+ #f)
+
+(define url
+ "https://github.com/jedisct1/libsodium")
+
+(define version
+ "1.0.19")
+
+;; ABSTRACTION LAYER -4
+
+(define komodo-vcpkg-ports-store
+ '(assoc-ref inputs "komodo-vcpkg-ports"))
+
+;; ABSTRACTION LAYER -3
+
+(define copy-cmakelists
+ `(lambda* (#:key inputs #:allow-other-keys)
+ (let ((destination ".")
+ (source (string-append ,komodo-vcpkg-ports-store
+ "/ports/libsodium/")))
+ (copy-recursively source
+ destination))))
+
+;; ABSTRACTION LAYER -2
+
+(define create-cmakelists
+ `(add-after 'unpack
+ 'create-cmakelists
+ ,copy-cmakelists))
+
+;; ABSTRACTION LAYER -1
+
+(define uri
+ (git-reference (url url)
+ (commit version)))
+
+(define phases
+ `(modify-phases %standard-phases
+ ,create-cmakelists))
+
+;; ABSTRACTION LAYER -0
+
+(define arguments
+ (list #:phases phases
+ #:tests? tests?))
+
+(define source
+ (origin (uri uri)
+ (method git-fetch)
+ (sha256 hash)))
+
+;; SURFACE LAYER
+
+(define-public libsodium-komodo
+ (package (inherit libsodium)
+ (name name)
+ (source source)
+ (build-system cmake-build-system)
+ (arguments arguments)
+ (inputs inputs)))
+