+devshell with opencode rules

This commit is contained in:
2026-02-18 08:28:46 +01:00
parent aeaa171bbf
commit d0f4f0ff2e
4 changed files with 133 additions and 2 deletions

View File

@@ -4,13 +4,21 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs";
agents = {
url = "git+https://code.m3ta.dev/m3tam3re/AGENTS";
flake = false;
};
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
m3ta-nixpkgs,
agents,
} @ inputs:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
pythonPackages = pkgs.python311Packages;
@@ -74,6 +82,12 @@
license = pkgs.lib.licenses.mit;
};
};
m3taLib = m3ta-nixpkgs.lib.x86_64-linux;
rules = m3taLib.opencode-rules.mkOpencodeRules {
inherit agents;
languages = ["python"];
};
in {
packages.default = zugferd-service;
packages.zugferd-service = zugferd-service;
@@ -96,6 +110,11 @@
]))
pkgs.python311Packages.pip
];
inherit (rules) instructions;
shellHook = ''
${rules.shellHook}
'';
};
});
}