sysmon/flake.nix
Jake Hillion e00a8d5083
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
setup flake and crate
2023-07-24 21:16:07 +01:00

34 lines
1.0 KiB
Nix

{
description = "A flake for building sysmon.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
treefmt-nix.url = "github:numtide/treefmt-nix";
treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, treefmt-nix, ... }@inputs:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
treefmtEval = treefmt-nix.lib.evalModule pkgs (pkgs: {
projectRootFile = "flake.nix";
programs.rustfmt.enable = true;
programs.nixfmt.enable = true;
});
in {
packages.default = pkgs.rustPlatform.buildRustPackage {
inherit (cargoToml.package) name version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
formatter = treefmtEval.config.build.wrapper;
checks.formatting = treefmtEval.config.build.check self;
});
}