-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
55 lines (53 loc) · 1.42 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
{
description = "A Nix-flake-based Rust development environment for PenTestDB";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
};
outputs = { self, nixpkgs, ... }:
let
# system should match the system you are running on
system = "x86_64-linux";
rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
pkgs = import <nixpkgs> { overlays = [ rust_overlay ]; };
rustVersion = "latest";
#rustVersion = "1.62.0";
rust = pkgs.rust-bin.stable.${rustVersion}.default.override {
extensions = [
"rust-src" # for rust-analyzer
];
};
in
{
devShells."${system}".default =
let
pkgs = import nixpkgs {
inherit system;
# overlays = [
# (self: super: rec { })
# # cargo
# # rustup
# # gdb
# # openssl
# # pkg-config
# ];
};
in
pkgs.mkShell {
# create an environment with nodejs-18_x, pnpm, and yarn
packages = with pkgs; [
gdb
openssl
pkg-config
# cargo
# rustc
rust-analyzer
rustfmt
clippy
rusty-man
];
shellHook = ''
IN_NIX_DEV="yes"
'';
};
};
}