Otok public index

apotocki/libsodium

apotocki/libsodium 1.0.22 (r1, android)

Library
libsodium
Variant
android, target android
Channel
stable
Published
2026-11-10
Recipe source
https://github.com/otok-dev/recipes.git
7387b6ee8dee98c91c576f3e39051559e5e83d83 in recipes/libsodium/1.0/android/
Recipe SHA-256
2b6827aab477ee9c94dd01e2821cc81580626b181677aba5033b0051cbeb0191

Recipe files changed

Inputs

source.mirrors["https://github.com/jedisct1/libsodium/releases/download/1.0.22-RELEASE/libsodium-1.0.22.tar.gz"]
source.sha256adbdd8f16149e81ac6078a03aca6fc03b592b89ef7b5ed83841c086191be3349
source.urlhttps://download.libsodium.org/libsodium/releases/libsodium-1.0.22.tar.gz

Platforms

android

Toolchains

Recipe files

build.lua 819 bytes · raw
-- libsodium's own configure and make, the library only. What it installs: libsodium.a, or libsodium.so.
function build(slice, options, deps)
    local t = slice.toolchain
    -- the target in CC itself: libtool passes no --target of the flags to the link of a shared object, which clang
    -- would then link for the build machine, without Android's libc
    local env = { CC = t.cc .. " --target=" .. slice.triple, CXX = t.cxx .. " --target=" .. slice.triple }
    -- --disable-pie: position-independent executables are for libsodium's tests, not the library
    otok.autotools{ args = { "--disable-pie" }, env = env }
    local p = slice.prefix
    local lib = p .. (slice.linkage == "static" and "/lib/libsodium.a" or "/lib/libsodium.so")
    return { libraries = { sodium = lib }, headers = p .. "/include" }
end
recipe.toml 1283 bytes · raw
# The otok recipe of libsodium (https://github.com/apotocki/otok): libsodium for Android, from the release archive, with
# its own configure; static or dynamic.
[recipe]
api = 1
library = "libsodium"
name = "libsodium"
version = "1.0.22"
revision = 1
license = "ISC"
license-files = ["LICENSE"]
homepage = "https://libsodium.org"
documentation = "https://doc.libsodium.org"
description = "Sodium, a modern, easy-to-use library for encryption, decryption, signatures, password hashing and more."
keywords = ["crypto", "cryptography", "encryption", "signatures", "nacl"]
linkage = ["static", "dynamic"]

# The archive of the release, signed with minisign by libsodium's key RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3
# (libsodium-1.0.22.tar.gz.minisig); the same file is an asset of the release on GitHub.
[source]
url = "https://download.libsodium.org/libsodium/releases/libsodium-1.0.22.tar.gz"
sha256 = "adbdd8f16149e81ac6078a03aca6fc03b592b89ef7b5ed83841c086191be3349"
mirrors = ["https://github.com/jedisct1/libsodium/releases/download/1.0.22-RELEASE/libsodium-1.0.22.tar.gz"]

[platforms]
supported = ["android"]
build-on = ["*/ndk"]

[toolchains]
make = { version = ">= 3.81", default-recipe = "apotocki/make" }

[[product]]
name = "Sodium"
libraries = ["sodium"]