REDISTRIBUTION.md (5208B)
Redistribution and replacement of native libraries
tricu's own code is licensed under ISC; see LICENSE. The native embedding also
uses third-party code. THIRD-PARTY-NOTICES.md, the notices/ directory and
license-components.json identify the components and preserve upstream license,
copyright and permission texts. The notices conservatively include source-only
parts of the upstream distributions and identify the components to which the
terms apply. The upstream texts govern licensing; package-manager metadata
provides an advisory index.
Distribute the paired artifacts
The tricu-portable Nix output supplies:
tricu-linux-x86_64.tar.gz: the runtime, header, binding and notices;tricu-source-materials.tar.gz: matching upstream sources, patches, Cabal revisions, tricu source, build recipes, lock file and link-input evidence;release.json: hashes pairing those two archives and the source manifests.
Provide the source archive with the runtime. For downloads, provide equivalent access to both from the same distribution location, clearly linked and without an additional source-access charge. Preserve the license texts and source rights when copying or modifying either archive. Publish or deliver both archives together using this accompanying-source arrangement.
Inside the source archive, components.json maps archive/object inputs and
bundled shared libraries to source owners and records original input hashes.
sources/COMPONENT/ holds the unmodified upstream input, separately numbered
Nix patches, a revised Cabal file where applicable, and evaluated recipe details.
recipe.json uses @OUTPUT_name@ for build-output placeholders. Full build logic
is in sources/nixpkgs/ and sources/tricu/, including the embedding build,
PIC toolchain configuration and native-library relocation script. SHA256.json
and SYMLINKS.json authenticate file contents and symbolic-link targets.
The source materials include the full GHC distribution and its boot libraries,
and full GCC sources for runtime components. The build command below obtains
the tools and pinned inputs through Nix.
Copyleft runtime components
The bundled libgmp and elfutils libelf/libdw use their LGPL-3.0-or-later
licensing option. libnuma uses LGPL 2.1. GCC runtime components, including
libatomic, carry GPLv3 terms with the GCC Runtime Library Exception 3.1.
The source and notice sets retain the applicable GPL/LGPL and exception texts.
System glibc remains external; source/notices for the glibc startup objects
selected by the linker accompany this package as well.
The bundled LGPL libraries remain separately loadable shared objects. You may
modify and replace compatible libraries and debug those modifications, including
by reverse engineering for that purpose, under their applicable licenses. The
runtime loads ABI-compatible replacement libraries through ELF resolution.
portable.json hashes describe the shipped package. Identify modified libraries
as modified and retain the applicable modification notices.
To use an ABI-compatible replacement, stop the embedding process, replace the
corresponding file in tricu/lib/, and start a fresh process. Preserve the ELF
SONAME, architecture and required exported ABI. $ORIGIN lookup permits the
replacement to live beside libtricu-haskell.so; other libraries already loaded
by an embedding application can influence ELF resolution. Test with the actual
host application. The complete tricu source is also supplied for rebuilding or
relinking against a changed interface. Keep each loaded library in place for
the lifetime of its embedding process.
Build and modification record
The 2026.10.24 packaging recipe links PIC Haskell archives and the threaded RTS
into the full host. Native inputs incorporate the patches and build-time edits
recorded in their recipe/source directories. The portable packager copies the
native shared objects and changes ELF RUNPATH to $ORIGIN; their upstream source
archives remain unmodified and their build patches are supplied separately.
License headers extracted from source files retain their complete leading
copyright/permission comment blocks. Refer to the original source for context.
From an extracted source-materials directory, the native build uses the tracked recipes and selected local build-script snapshots:
nix build "path:$PWD/sources/tricu#tricu-haskell-ffi-archive" --no-link --no-write-lock-file \
--override-input nixpkgs "path:$PWD/sources/nixpkgs" \
--override-input flake-utils "path:$PWD/sources/flake-utils" \
--override-input flake-utils/systems "path:$PWD/sources/systems"
Nix may fetch build tools and pinned inputs. The upstream archives and patches are provided independently of that fetch mechanism for inspection, modification and rebuilding. ABI-compatible dynamic replacements use the existing tricu host. If you change the linking model or add dependencies, reassess their license requirements and regenerate the source/notice inventory.
The build gates verify source ownership, required notice presence, hashes and archive pairing. Review the applicable license terms for your distribution and modifications.