vipak is a language-agnostic package manager that provides dependency management and build automation for projects. It features a flexible backend system that retrieves dependencies from package trees and supports both global package management and local project builds.
Currently, vipak uses the vipak tree as its default backend—a collection of JSON files containing package metadata, dependency information, download sources, and build instructions.
- git
- gmake
- cc
- voc
git clone https://codeberg.org/vishapoberon/vipak
cd vipak
gmake
Now you don't need make
anymore. (:
Run vipak --help
to see all available options.
# Sync the default package tree to ~/.vipak/vipatsar
vipak -s
# Show dependencies only (no download/build)
vipak -d -p irc_bot
# Resolve and fetch packages
vipak -f -p irc_bot
# Build package and dependencies (default prefix: ~/vpkLocal)
vipak -p irc_bot
# Ask for confirmation before building
vipak -a -p irc_bot
# Build with custom prefix
vipak -p irc_bot -P /tmp/coolprefix
# Use custom package tree
vipak -p irc_bot -P /tmp/coolprefix -t /tmp/myothertree
Vipak provides a powerful local build system for projects that automatically handles dependency resolution, fetching, and compilation. Build complex projects with external dependencies using a simple vipak --local
command.
vipak --init
This creates:
vipak.json
- Project configuration filesrc/myproject.Mod
- Template Oberon module
vipak --local
This will:
- Resolve and fetch all dependencies
- Compile dependencies in dependency order
- Build your project sources
myproject/
├── vipak.json # Project configuration
├── src/ # Your source files
│ └── myproject.Mod
├── build/ # Build output (created automatically)
│ └── deps/ # Downloaded dependencies
└── deps.dot # Dependency graph (for visualization)
The vipak.json
file defines your project configuration:
{
"Package": "project-name",
"Author": "Your Name",
"License": "GPL-3",
"Version": "0.1",
"Remote": {
"type": "git",
"path": "https://codeberg.org/yourname/project",
"tag": "0.1"
},
"Dependencies": {
"dependency1": "version",
"dependency2": "version"
},
"Build": [
{
"Command": "voc -m",
"File": "src/main.Mod"
}
]
}
- Package: Project name
- Author: Author name
- Version: Project version
- Build: Array of build steps
- License: Software license
- Remote: Git repository information (for publishing)
- Dependencies: External dependencies to fetch and build
{
"Package": "myproject",
"Author": "Your Name",
"License": "GPL-3",
"Version": "0.1",
"Remote": {
"type": "git",
"path": "https://codeberg.org/yourname/myproject",
"tag": "0.1"
},
"Dependencies": {
"opts": "0.1",
"Internet": "0.1"
},
"Build": [
{
"Command": "voc -m",
"File": "src/myproject.Mod"
}
]
}
Build both a main program and a test program:
{
"Package": "myproject",
"Author": "Your Name",
"License": "GPL-3",
"Version": "0.1",
"Dependencies": {
"opts": "0.1",
"Internet": "0.1"
},
"Build": [
{
"Command": "voc -m",
"File": "src/myproject.Mod"
},
{
"Command": "voc -m",
"File": "src/test.Mod"
}
]
}
For projects that only build library modules:
{
"Package": "mylib",
"Author": "Your Name",
"License": "MIT",
"Version": "0.2",
"Build": [
{
"Command": "voc -s",
"File": "src/MyLib.Mod"
},
{
"Command": "voc -s",
"File": "src/MyLibUtils.Mod"
}
]
}
voc -m file.Mod
- Compile main program (creates executable)voc -s file.Mod
- Compile library module (creates .sym file)voc -C file.Mod
- Compile to object file only
You can use any build command, not just voc
:
"Build": [
{
"Command": "make",
"File": "Makefile"
},
{
"Command": "cp src/config.txt",
"File": "config/default.txt"
}
]
Vipak automatically:
- Resolves transitive dependencies - If A depends on B, and B depends on C, all three are built
- Handles dependency order - Builds dependencies before dependents
- Avoids duplicates - Each dependency is built only once
- Supports multiple sources - Git repositories, HTTP/HTTPS file downloads
- Creates build graph - Generates
deps.dot
for visualization
# Generate PNG image of dependency graph
dot -Tpng deps.dot > deps.png
When you run vipak --local
:
- Parse vipak.json - Read project configuration
- Resolve dependencies - Build complete dependency tree
- Create build directory -
build/
for outputs - Fetch dependencies - Download from Git/HTTP sources
- Build dependencies - Compile in correct order
- Build project - Compile your source files
myproject/
├── build/
│ ├── deps/ # Dependency sources
│ │ └── domain.com/project/
│ │ └── src/
│ ├── myproject # Your executable
│ └── *.sym # Symbol files
└── deps.dot # Dependency graph
# Initialize new project
$ vipak --init
Project initialized! You can now:
1. Edit src/myproject.Mod with your code
2. Edit vipak.json to configure build settings
3. Run 'vipak --local' to build the project
# Edit your source file
$ vim src/myproject.Mod
# Build the project
$ vipak --local
Building local project from: vipak.json
Building project: myproject v0.1
Created build directory: build
resolving dependencies for local project...
Found 2 direct dependencies
Resolving: opts
Resolving: Internet
done! (:
dependency graph:
-----------------
digraph dependencies {
opts -> strutils
Internet -> strutils
}
-----------------
dependencies will be installed in the following order:
strutils
opts
Internet
Fetching: strutils
*** GIT: Cloning to: 'build/deps/codeberg.org/vishapoberon/strutils'
*** GIT: Clone successful
Building dependency: strutils
Build successful
Fetching: opts
*** GIT: Cloning to: 'build/deps/codeberg.org/vishapoberon/opts'
*** GIT: Clone successful
Building dependency: opts
Build successful
Fetching: Internet
*** HTTP: fetchFiles called
getting http://example.com/Internet.Mod
Build successful
All dependencies processed!
Building project: myproject
Executing: voc -m ../src/myproject.Mod
../src/myproject.Mod Compiling myproject. Main program. 608 chars.
Build completed successfully!
# Run your program
$ ./build/myproject
Hello from myproject!
This project was built using vipak --local
"symbol file of imported module not found"
- Dependency wasn't built successfully
- Check dependency is listed in vipak.json
- Verify dependency exists in package tree
"Failed to change to build directory"
- Build directory creation failed
- Check file permissions
- Ensure sufficient disk space
"Warning: Build failed with code: X"
- Dependency compilation failed
- Check dependency source code
- Verify voc can compile the dependency
- Check dependency graph: Use
dot -Tpng deps.dot > deps.png
- Verify downloads: Look in
build/deps/
for source files - Test dependencies manually: Try building dependencies with
voc
directly - Check build order: Dependencies should build before your project
Vipak integrates with the global package tree for dependency resolution. Dependencies are resolved from:
- Default package tree -
~/.vipak/vipatsar/
- Custom package tree - by using
-t
option. - Project vipak.json - when building local project.
You can override the package tree location:
vipak --tree /path/to/custom/tree --local
Once dependencies are downloaded to build/deps/
, builds work offline. Delete the build directory to force re-downloading dependencies.
vipak currently doesn't care about package versions.
It can check md5
sums of downloaded files. But package version information is ignored for now.
To contribute to vipak or report issues, visit: https://codeberg.org/vishapoberon/vipak
vipak - making dependency management simple and language-agnostic