Otok public index

apotocki/libsodium

apotocki/libsodium 1.0.22 (r1, apple)

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

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

ios, iossim, macosx, catalyst, tvos, tvossim, watchos, watchossim, xros, xrossim

Toolchains

Recipe files

PrivacyInfo.xcprivacy 627 bytes · raw
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSPrivacyTracking</key>
	<false/>
	<key>NSPrivacyTrackingDomains</key>
	<array/>
	<key>NSPrivacyCollectedDataTypes</key>
	<array/>
	<key>NSPrivacyAccessedAPITypes</key>
	<array>
		<dict>
			<key>NSPrivacyAccessedAPIType</key>
			<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
			<key>NSPrivacyAccessedAPITypeReasons</key>
			<array>
				<string>C617.1</string>
				<string>0A2A.1</string>
			</array>
		</dict>
	</array>
</dict>
</plist>
build.lua 815 bytes · raw
-- libsodium's own configure and make, the library only. What it installs: libsodium.a, or libsodium.dylib with its links.
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 dynamic library, which clang
    -- would then link for the build machine
    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.dylib")
    return { libraries = { sodium = lib }, headers = p .. "/include" }
end
recipe.toml 1448 bytes · raw
# The otok recipe of libsodium (https://github.com/apotocki/otok): libsodium for every Apple platform, 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 = ["ios", "iossim", "macosx", "catalyst", "tvos", "tvossim", "watchos", "watchossim", "xros", "xrossim"]
build-on = ["macos/xcode"]

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

[[product]]
name = "Sodium"
libraries = ["sodium"]
apple = { privacy-manifest = "PrivacyInfo.xcprivacy" }