-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
58 lines (52 loc) · 1.82 KB
/
flake.nix
File metadata and controls
58 lines (52 loc) · 1.82 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
{
description = "GraphWalker Rust developer environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
allSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
# Rust toolchain
rustc
cargo
rustfmt
clippy
rust-analyzer
# Node.js for frontend studio development
nodejs
# Standard dependencies that cargo packages might compile against
pkg-config
openssl
];
# Set up environment variables
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
shellHook = ''
echo "=========================================================="
echo " GraphWalker Rust Development Environment (Nix)"
echo " - Rust version: $(rustc --version 2>/dev/null || echo 'Not installed')"
echo " - Cargo version: $(cargo --version 2>/dev/null || echo 'Not installed')"
echo " - Node version: $(node --version 2>/dev/null || echo 'Not installed')"
echo ""
echo " Useful commands:"
echo " cargo build - Build the Rust workspace"
echo " cargo test - Run all tests"
echo " cargo run -p graphwalker-cli -- --help - Run the CLI"
echo "=========================================================="
'';
};
});
};
}