servicepoint-binding-c/flake.nix
Vinzenz Schroeter d98aec63b0
All checks were successful
Rust / build-gnu-apt (pull_request) Successful in 5m23s
Rust / build-size-gnu-unstable (pull_request) Successful in 1m14s
examples work as packages in flake
2025-06-02 17:22:38 +02:00

46 lines
1.1 KiB
Nix

{
description = "Flake for the servicepoint library.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
nix-filter.url = "github:numtide/nix-filter";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
self,
nixpkgs,
fenix,
nix-filter
}:
let
supported-systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems =
f:
nixpkgs.lib.genAttrs supported-systems (
system:
f rec {
inherit system self;
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib // nix-filter.lib;
fenix = inputs.fenix.packages.${system};
selfPkgs = self.packages.${system};
}
);
in
{
packages = forAllSystems (import ./packages.nix);
devShells = forAllSystems (import ./devShells.nix);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}