-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
60 lines (53 loc) · 1.51 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
{
description = "mos6502";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, flake-compat, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
in
with pkgs;
{
devShell = mkShell rec {
buildInputs = [
# General C Compiler/Linker/Tools
lld
clang
pkg-config
openssl
# Rust Compiler
(rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analysis" ];
})
rust-analyzer
cargo-watch
# Graphics Dependencies
fontconfig
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXi
vulkan-loader
vulkan-tools
libGL
bzip2
];
# Allows rust-analyzer to find the rust source
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}";
# Without this graphical frontends can't find the GPU adapters
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}";
};
}
);
}