/
flake.nix
66 lines (58 loc) · 1.57 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{
description = "Flake utils demo";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
rust-overlay.overlays.default
];
pkgs = import nixpkgs {
inherit overlays system;
};
darwin-packages = with pkgs; with pkgs.darwin.apple_sdk; [
libiconv
frameworks.Security
frameworks.CoreFoundation
frameworks.Security
];
testPython = pkgs.python3.withPackages (ps: with ps; [
boto3
pynamodb
pytest
pytest-instafail
pytest-randomly
pytest-timeout
pytest-xdist
requests
]);
in
{
devShells = rec {
default = rust-dev;
rust-dev = pkgs.mkShell {
buildInputs = with pkgs; [
rustup
rust-analyzer
clippy
cargo-insta
rustfmt
testPython
ruff
black
sqlite
rlwrap
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin darwin-packages;
shellHook = ":";
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
RUST_LOG = "rynamodb=debug";
};
};
}
);
}