prometheus-satisfactory-exp.../flake.nix
2024-09-15 18:48:41 +02:00

46 lines
1.3 KiB
Nix

{
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
perSystem =
{ self', pkgs, ... }:
{
devShells.default = pkgs.mkShell {
inputsFrom = [ self'.packages.prometheus-satisfactory-exporter ];
packages = with pkgs; [
self'.formatter
clippy
rust-analyzer
rustfmt
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
formatter = pkgs.nixfmt-rfc-style;
packages = {
default = self'.packages.prometheus-satisfactory-exporter;
prometheus-satisfactory-exporter = pkgs.rustPlatform.buildRustPackage {
name = "prometheus-satisfactory-exporter";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
buildInputs = with pkgs; [
pkg-config
openssl
];
};
};
};
};
}