git clone https://github.com/syntaxroot-cc/gomnibus-software
cd gomnibus-software
git config core.hooksPath .githooks # enable gofmt pre-commit hook
go test ./...-
Create
config/software/<name>.yaml. Required fields:name,default_version,license. If the source has a URL, include asha256checksum. -
If your definition depends on other software in the library, list them under
dependencies:. The CI test will fail if a dependency is not found in the library. -
If multiple versions are supported, add them under
versions:with per-versionsourceandrelative_pathblocks as needed. -
Run
go test ./...locally — it catches YAML parse errors, missing checksums, unknown dependencies, and malformed version blocks.
The YAML schema mirrors gomnibus's software.Definition struct. Key fields:
name: mylib
default_version: "1.2.3"
license: MIT
license_file: LICENSE # optional: path inside source tree
source:
url: "https://example.com/mylib-1.2.3.tar.gz"
sha256: "abc123..."
relative_path: "mylib-1.2.3" # extracted directory name (if different from name-version)
dependencies:
- zlib # must exist in this library
versions:
- version: "1.2.2"
source:
url: "https://example.com/mylib-1.2.2.tar.gz"
sha256: "def456..."
relative_path: "mylib-1.2.2"
build:
- configure: [] # runs ./configure --prefix=${install_dir}
- configure: # with extra args; ${install_dir}, ${src_dir}, ${build_dir} expand
- "--disable-debug"
- "--with-ssl=${install_dir}"
- command: "..." # shell command; ${install_dir}, ${src_dir}, ${build_dir} are expanded
- make: [] # runs make
- make: [install] # runs make install
- make: # with var expansion in args
- install
- "PREFIX=${install_dir}"
- mkdir: "${install_dir}/bin"
- copy:
src: "..."
dst: "..."- No comments explaining what — only non-obvious why.
gofmtis enforced by the pre-commit hook and CI.