# keymaps - A rust crate which provides a standardized encoding for key codes
#
# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de>
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# This file is part of the keymaps crate.
#
# You should have received a copy of the License along with this program.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.txt>.
{
description = "A rust crate which provides a standardized encoding for key codes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
ebnf2pdf = {
url = "git+https://codeberg.org/bpeetz/ebnf2pdf.git";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
systems.follows = "systems";
};
};
# inputs for following
systems = {
url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
};
flake-utils = {
url = "github:numtide/flake-utils";
inputs = {
systems.follows = "systems";
};
};
};
outputs = {
self,
nixpkgs,
flake-utils,
treefmt-nix,
ebnf2pdf,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages."${system}";
treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
in {
checks = {
formatting = treefmtEval.config.build.check self;
};
formatter = treefmtEval.config.build.wrapper;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
cargo
clippy
rustc
rustfmt
cargo-edit
ebnf2pdf.outputs.packages."${system}".default
cocogitto
reuse
];
};
});
}
# vim: ts=2