-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (38 loc) · 1.16 KB
/
flake.nix
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
44
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
crane.url = "github:ipetkov/crane";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.rust-analyzer-src.follows = "";
};
};
outputs = { self, nixpkgs, flake-utils, pre-commit-hooks, fenix, crane }:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-darwin" ] (system:
let
version = "0.1.0-alpha";
pkgs = import nixpkgs { inherit system; overlays = [ ]; };
craneLib = (crane.mkLib pkgs).overrideToolchain
fenix.packages.${system}.stable.toolchain;
in
{
checks = { };
packages = { };
devShells = {
default = craneLib.devShell {
packages = with pkgs; [
nil
nixpkgs-fmt
cargo-watch
just
openssl
pkg-config
git
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin ([ pkgs.libiconv ]);
};
};
});
}