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
{
description = "A very basic Rust development flake";
inputs = {
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs: with inputs;
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
rust-toolchain = with fenix.packages.${system}; fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-mvUGEOHYJpn3ikC5hckneuGixaC+yGrkMM/liDIDgoU=";
};
in {
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
lld
rust-toolchain
pkg-config
rust-analyzer
# cmake
# gnumake
# kdePackages.extra-cmake-modules
# gdb
# libx11
# libx11.dev
# wayland
# wayland-protocols
# libxkbcommon
# wayland-scanner
# libxrandr
# libxinerama
# libxcursor
# libxi
# libGL
];
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
shellHook = ''
export RUST_LOG=debug
export PATH="$PATH:$HOME/.cargo/bin"
alias gc='git commit'
alias gca='git commit --amend'
alias gcm='git commit -m'
alias gp='git push'
'';
};
}
);
}