Files
nbt-cpp/flake.nix
bramderaeve f1158310dc nix flake
2026-05-05 03:16:10 +02:00

51 lines
1.0 KiB
Nix

{
description = "NBT library and converter for C++17";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs =
inputs@{
flake-parts,
nixpkgs,
self,
...
}:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
];
perSystem =
{ pkgs, self', ... }:
{
packages = {
nbt-cpp = pkgs.callPackage ./package.nix { };
default = self'.packages.nbt-cpp;
};
formatter = pkgs.writeShellApplication {
name = "nixfmt-nbt-cpp";
runtimeInputs = [
pkgs.nixfmt
];
text = ''
nixfmt flake.nix package.nix
'';
};
devShells.default = pkgs.mkShell {
inputsFrom = [
self'.packages.nbt-cpp
];
packages = with pkgs; [
cppcheck
];
};
};
};
}