Skip to content

Commit 7d19963

Browse files
feat: add proper nix flake
1 parent 9a36263 commit 7d19963

16 files changed

Lines changed: 296 additions & 155 deletions

.envrc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
eval "$(devenv direnvrc)"
2-
use devenv
1+
use flake

.github/dependabot.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "cargo"
5+
directory: "/"
6+
schedule:
7+
interval: "monthly"
8+
9+
- package-ecosystem: "nix"
10+
directory: "/"
11+
schedule:
12+
interval: "monthly"
13+
14+
- package-ecosystem: "github-actions"
15+
directory: ".github/workflows"
16+
schedule:
17+
interval: "monthly"

Cargo.lock

Lines changed: 44 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ lto = true
1616
strip = true
1717

1818
[build-dependencies]
19-
built = { git = "https://github.com/lukaslueg/built", features = ["git2"] }
19+
built = { version = "0", features = ["git2"] }
2020

2121
[dependencies]
2222
anyhow = "1"
23-
azalea = { git = "https://github.com/azalea-rs/azalea" }
24-
azalea-hax = { git = "https://github.com/azalea-rs/azalea-hax" }
23+
azalea = "0"
2524
bevy_app = "0"
2625
bevy_ecs = "0"
2726
bevy_log = "0"

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,13 @@ A Minecraft bot with Lua scripting support, written in Rust with [azalea](https:
2121
$ git clone https://github.com/ErrorNoInternet/ErrorNoWatcher
2222
$ cd ErrorNoWatcher
2323
$ cargo build --release
24-
$ # ./target/release/errornowatcher
24+
$ ./target/release/errornowatcher
25+
```
26+
27+
#### Nix
28+
29+
```sh
30+
nix run github:ErrorNoInternet/ErrorNoWatcher
2531
```
2632

2733
Make sure the `Server` and `Username` globals are defined in `main.lua` before starting the bot.

default.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
lib,
3+
pkgs,
4+
rust,
5+
self,
6+
}:
7+
pkgs.rustPlatform.buildRustPackage {
8+
pname = "errornowatcher";
9+
version = self.shortRev or self.dirtyShortRev;
10+
11+
cargoLock.lockFile = ./Cargo.lock;
12+
src = lib.cleanSource ./.;
13+
14+
nativeBuildInputs = with pkgs; [
15+
rust
16+
17+
mold
18+
pkg-config
19+
];
20+
21+
buildInputs = with pkgs; [
22+
luajit
23+
];
24+
}

0 commit comments

Comments
 (0)