-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
43 lines (40 loc) · 1.04 KB
/
flake.nix
File metadata and controls
43 lines (40 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# SPDX-FileCopyrightText: 2025 Foundation Devices, Inc. <hello@foundation.xyz>
# SPDX-License-Identifier: GPL-3.0-or-later
{
description = "foudation-api dev environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
fenix,
}: let
inherit (nixpkgs) lib;
forAllSystems = f: lib.genAttrs ["aarch64-darwin" "x86_64-darwin" "aarch64-linux" "x86_64-linux"] f;
in {
devShells = forAllSystems (
system: let
pkgs = import nixpkgs {
inherit system;
};
toolchain = fenix.packages.${system}.fromToolchainFile {
file = self + "/rust-toolchain.toml";
sha256 = "sha256-18J/HvJzns0BwRNsUNkCSoIw7MtAmppPu5jNzuzMvCc=";
};
in {
default = pkgs.mkShellNoCC {
packages = with pkgs;
[gcc cargo-insta]
++ [
toolchain
];
};
}
);
};
}