generated from fastn-stack/fastn-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
44 lines (37 loc) · 1.06 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
{
description = "Fifthtry easy contest";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
inputs.rust-overlay.url = "github:oxalica/rust-overlay";
outputs = { self, nixpkgs, rust-overlay }:
let
system = "x86_64-linux";
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
toolchain = pkgs.rust-bin.stable.latest.default.override {
targets = [ "wasm32-unknown-unknown" ];
extensions = [ "rustfmt" "clippy" "rust-src" ];
};
in
{
devShells.${system}.default = pkgs.mkShell {
name = "ec-shell";
nativeBuildInputs = with pkgs; [
pkg-config
postgresql_14
openssl.dev
];
buildInputs = with pkgs; [
diesel-cli
toolchain
rust-analyzer-unwrapped
];
shellHook = ''
source scripts/auto.sh
'';
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
};
formatter.${system} = pkgs.nixpkgs-fmt;
};
}