-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.ss
executable file
·35 lines (30 loc) · 1001 Bytes
/
build.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env gxi
;; -*- Gerbil -*-
;; This is the build file for Gerbil-crypto. Invoke it using
;; ./build.ss [cmd]
;; where [cmd] is typically left empty (same as "compile")
;; Note that may you need to first:
;; gxpkg install github.com/fare/gerbil-utils
;; gxpkg install github.com/fare/gerbil-poo
(import
:std/cli/multicall
:std/format :std/misc/path
:clan/building
:clan/filesystem :clan/versioning)
(def here (path-parent (this-source-file)))
(def (build-spec)
[[gxc: "keccak" "-cc-options" (format "-I~a" here)]
[static-include: "keccak-tiny-unrolled.c"]
"ed25519-ffi" "ed25519" "secp256k1-ffi" "secp256k1" "blake2"
"password" "random" "version"])
(init-build-environment!
name: "Gerbil-crypto"
deps: '("clan" "clan/poo")
spec: build-spec
pkg-config-libs: '("libsecp256k1" "libsodium")
nix-deps: '("secp256k1" "libsodium"))
(define-entry-point (nix)
(help: "Build using nix-build" getopt: [])
(create-version-file)
(run-process ["nix-build"])
(void))