servicepoint-binding-c/flake.nix
Vinzenz Schroeter 69bed7c665 wip 80k example
2025-04-12 16:25:20 +02:00

73 lines
1.5 KiB
Nix

{
description = "Flake for the servicepoint library.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs =
inputs@{
self,
nixpkgs,
}:
let
lib = nixpkgs.lib;
supported-systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
forAllSystems =
f:
lib.genAttrs supported-systems (
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
}
);
in
{
devShells = forAllSystems (
{ pkgs, system }:
{
default = pkgs.mkShell rec {
buildInputs = with pkgs;[
xe
xz
libgcc
#glibc.static
musl
libunwind
];
nativeBuildInputs = with pkgs;[
(pkgs.symlinkJoin {
name = "rust-toolchain";
paths = with pkgs; [
#rustc
#cargo
#rustPlatform.rustcSrc
#rustfmt
#clippy
cargo-expand
cargo-tarpaulin
rustup
];
})
gcc
gnumake
pkg-config
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
}
);
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}