Skip to content

Commit e55014d

Browse files
committed
build: use flakes for devshell
1 parent 89bf141 commit e55014d

File tree

4 files changed

+130
-1
lines changed

4 files changed

+130
-1
lines changed

.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#SPDX-FileCopyrightText: 2025 Linnea Gräf <nea@nea.moe>
22
#
33
#SPDX-License-Identifier: CC0-1.0
4-
use nix
4+
use flake

REUSE.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ SPDX-FileCopyrightText = ["Linnea Gräf <nea@nea.moe>", "Firmament Contributors"
5656
path = ["src/main/resources/legacy_data/*.json"]
5757
SPDX-License-Identifier = "MIT"
5858
SPDX-FileCopyrightText = ["PrismarineJS Minecraft Data"]
59+
60+
[[annotations]]
61+
path = ["flake.lock"]
62+
SPDX-License-Identifier = "CC0-1.0"
63+
SPDX-FileCopyrightText = ["Auto Generated"]

flake.lock

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

flake.nix

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# SPDX-FileCopyrightText: 2026 Linnea Gräf <nea@nea.moe>
2+
#
3+
# SPDX-License-Identifier: GPL-3.0-or-later
4+
{
5+
inputs = {
6+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
7+
8+
flake-utils.url = "github:numtide/flake-utils";
9+
10+
treefmt-nix.url = "github:numtide/treefmt-nix";
11+
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
12+
};
13+
outputs =
14+
inputs@{
15+
treefmt-nix,
16+
flake-utils,
17+
self,
18+
nixpkgs,
19+
...
20+
}:
21+
let
22+
overlays = [
23+
];
24+
in
25+
flake-utils.lib.eachDefaultSystem (
26+
system:
27+
let
28+
pkgs = import nixpkgs { inherit overlays system; };
29+
treefmtEval =
30+
(treefmt-nix.lib.evalModule pkgs {
31+
projectRootFile = "flake.nix";
32+
imports = [ ];
33+
programs.nixfmt.enable = true;
34+
}).config.build;
35+
in
36+
{
37+
formatter = treefmtEval.wrapper;
38+
checks.formatting = treefmtEval.check self;
39+
devShells.default = import ./shell.nix { inherit pkgs; };
40+
}
41+
);
42+
}

0 commit comments

Comments
 (0)