meson
Skill1 starsChanged 9 months agoMITView on GitHub
Package a Meson/Ninja project for corepkgs. Use when a source tree has a meson.build — covers mesonFlags, auto features, cross-compilation, and diagnosing Meson setup failures.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cmakeSkill
- ekala-cmake-nixSkill
- ekapkgs-repoSkill
- goSkill
- mk-many-variantsSkill
- nix-buildSkill
- nix-evalSkill
- packagingSkill
- portingSkill
- pythonSkill
- rustSkill
- structured-attrsSkill
- validationSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 72
Use mesonEntries to specify Meson -D options as a structured attrset.
- Very specific: line 85
Use mesonFeatures for Meson feature type options (those that accept enabled/disabled/auto).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Meson Build System
Minimal Example
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "example";
version = "1.0.0";
src = fetchFromGitHub {
owner = "example";
repo = "example";
tag = "v${finalAttrs.version}";
hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
nativeBuildInputs = [
meson
meson.configurePhaseHook # Required
ninja # Required
pkg-config
];
meta = {
description = "Example Meson package";
license = lib.licenses.mit;
};
})Essential Requirements
Always include:
meson.configurePhaseHook- Sets up configure phaseninja- Required (Meson generates Ninja files)pkg-config- Usually needed for dependencies
Common Patterns
With Dependencies
nativeBuildInputs = [
meson
meson.configurePhaseHook
ninja
pkg-config
];
buildInputs = [
glib
libcap
];Meson Entries (Preferred)
Use mesonEntries to specify Meson -D options as a structured attrset.
Booleans are automatically converted to true/false.
mesonEntries = {
docs = false;
man = true;
wrap_mode = "nodownload";
};Meson Features
Use mesonFeatures for Meson feature type options (those that accept
enabled/disabled/auto). Booleans are automatically converted to
enabled/disabled.
mesonFeatures = {
introspection = withIntrospection;
tests = false;
};Both mesonEntries and mesonFeatures are merged into the same set of -D
flags. If a key appears in both, mesonFeatures wins.
Meson Flags (Legacy)
mesonFlags still works for string-based flags and non--D flags:
mesonFlags = [
"-Ddocs=false"
"-Dtests=false"
"-Dsystemd=disabled"
"-Dman=true"
];Both can be used together. mesonFlags values override mesonEntries for the
same key (meson uses last-wins for -D flags). Use mesonFlags for non--D
flags like --cross-file.
Cross-Compilation
strictDeps = true;
nativeBuildInputs = [ meson meson.configurePhaseHook ninja pkg-config ];
buildInputs = [ glib ];
depsBuildBuild = [ pkg-config ];Troubleshooting
Dependency not found:
mesonFeatures = { optional_feature = false; };Disable subproject downloads:
mesonEntries = { wrap_mode = "nodownload"; };Disable documentation:
mesonEntries = {
docs = false;
gtk_doc = false;
man = false;
};Force library directory:
mesonEntries = { libdir = "lib"; };Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

