servicepoint-binding-uniffi/flake.nix

61 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2024-11-09 21:25:46 +01:00
{
2025-02-08 14:49:04 +01:00
description = "Flake for the servicepoint library.";
2024-11-09 21:25:46 +01:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
2024-11-09 21:25:46 +01:00
};
outputs =
inputs@{
self,
nixpkgs,
}:
let
lib = nixpkgs.lib;
supported-systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
2025-02-15 09:29:29 +01:00
forAllSystems =
f:
lib.genAttrs supported-systems (
system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
inherit system;
}
);
2024-11-09 21:25:46 +01:00
in
rec {
devShells = forAllSystems (
2025-02-15 09:29:29 +01:00
{ pkgs, system }:
2024-11-09 21:25:46 +01:00
{
default = pkgs.mkShell rec {
2024-11-23 17:38:50 +01:00
packages = with pkgs; [
(pkgs.symlinkJoin {
2025-02-15 09:29:29 +01:00
name = "rust-toolchain";
paths = with pkgs; [
rustc
cargo
rustPlatform.rustcSrc
rustfmt
clippy
cargo-expand
cargo-tarpaulin
];
})
xe
xz
pkg-config
2024-11-23 17:38:50 +01:00
];
2024-11-09 21:25:46 +01:00
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
}
);
2025-02-15 09:29:29 +01:00
formatter = forAllSystems ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
2024-11-09 21:25:46 +01:00
};
}