mirror of
https://codeberg.org/spire/nix.git
synced 2026-11-30 11:30:45 +01:00
document flake module
This commit is contained in:
parent
8779290efd
commit
703a7cbb25
1 changed files with 37 additions and 0 deletions
37
README.md
37
README.md
|
|
@ -65,6 +65,43 @@ sourcemod doesn't support all of them.
|
||||||
`mcv`, `blade`, `csgo`, `tf2`, `cs2`, `sdk2013`, `dota`, `dods`, `hl2dm`,
|
`mcv`, `blade`, `csgo`, `tf2`, `cs2`, `sdk2013`, `dota`, `dods`, `hl2dm`,
|
||||||
`deadlock`, `insurgency` and `css`
|
`deadlock`, `insurgency` and `css`
|
||||||
|
|
||||||
|
## Flake framework
|
||||||
|
|
||||||
|
This repository contains a batteries-included flake framework based on
|
||||||
|
[flakelight](https://github.com/nix-community/flakelight).
|
||||||
|
|
||||||
|
```nix
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
utils.url = "github:numtide/flake-utils";
|
||||||
|
nixpkgs.url = "nixpkgs/release-26.05";
|
||||||
|
flakelight.url = "github:nix-community/flakelight";
|
||||||
|
spire.url = "git+https://codeberg.org/spire/nix";
|
||||||
|
flakelight.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
spire.inputs.flakelight.follows = "flakelight";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ spire, ... }:
|
||||||
|
spire ./. {
|
||||||
|
# optional if you only need the `<sourcemod>` include.
|
||||||
|
includes =
|
||||||
|
includes: (with includes; [
|
||||||
|
curl
|
||||||
|
json
|
||||||
|
]);
|
||||||
|
# defaults to ./plugin
|
||||||
|
pluginDir = ./my-plugin-directory;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This will create a package for every `.sp` file in the plugin directory (named
|
||||||
|
after the filename), and a `default` package containing all the plugins in the
|
||||||
|
directory.
|
||||||
|
|
||||||
|
Additionally it sets up a devshell with `spcomp` with the chosen includes.
|
||||||
|
|
||||||
## Building sourcepawn script
|
## Building sourcepawn script
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue