Building for people, tools and agents.

Bring your own OS.

Build the operating system you need. Own the engineering behind it — and give people, tools and AI agents a common way to work with it.

One platform, different systems

Barney provides the tools to build operating systems. The recipes, foundations and systems built with it can be entirely your own.

Built in the open. Better with you.

Barney is independent, open-source engineering. Explore the code, follow development, report issues or help support the work.

More than recipes

.bny describes packages, properties, dependencies, variants and build behaviour in a structured format.

That means the same engineering model can be understood by the people building a system, the tools inspecting it, and AI agents working with it.

Instead of asking an agent to guess what a pile of shell scripts does, Barney gives it something structured to understand and work with.

Properties

A package can define settings that affect how it is built.

properties {
    (bool) with_systemd #true
    (list) enabled {
        "systemd"
    }
    (list) disabled {}
}

Variants

A variant lets a package be built with a different set of settings.

variant "bootstrap" {
    with_systemd #false
    enabled { }
    disabled {
        "systemd"
    }
}

Dependencies

Dependencies can depend on a setting or use a particular variant. Bootstrap variants can help break dependency cycles.

depends {
    build {
        (binary)make
        util-linux variant="bootstrap" conflicts=(prop)with_systemd
        systemd if=(prop)with_systemd
    }
}

Build steps

Build and installation are separate steps. Recipes can call actions provided by a module.

build {
    autotools::configure enable=(prop)enabled disable=(prop)disabled
    autotools::make
}

install {
    autotools::make_install
}

Modules

Modules let recipes share common build actions instead of repeating them.

module autotools {
    action configure {
        properties {
            (string) command "./configure"
            (string) prefix (prop)env::prefix
            (list) enable "shared"
            (list) disable "static"
        }
        execute {
            emit (prop)command "--prefix=" (prop)prefix
            // Further options are emitted from the declared properties.
        }
    }
}

Have a look at the full util-linux recipe, systemd recipe, bash recipe and Autotools module.