-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
92 lines (80 loc) · 2.11 KB
/
flake.nix
File metadata and controls
92 lines (80 loc) · 2.11 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Based on
# https://github.com/nixvital/nix-based-cpp-starterkit/tree/main
{
description = "vsdf";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/25.11";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, ... }@inputs: inputs.utils.lib.eachSystem [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
]
(system:
let
pkgs = import nixpkgs {
inherit system;
# Add overlays here if you need to override the nixpkgs
# official packages.
overlays = [ ];
# Uncomment this if you need unfree software (e.g. cuda) for
# your project.
#
# config.allowUnfree = true;
};
vsdfPkg = pkgs.callPackage ./default.nix { };
in
{
devShells.default =
assert pkgs.lib.versionAtLeast pkgs.glfw.version "3.4";
pkgs.mkShell rec {
name = "vsdf";
packages = with pkgs; [
# Development Tools
llvmPackages_21.clang
cmake
cmakeCurses
ninja
# Development time dependencies
gtest
# Dependencies
glfw
glm
spdlog
vulkan-loader
vulkan-headers
ffmpeg
pkg-config
# shaderc
spirv-tools
glslang
];
# Setting up the environment variables you need during
# development.
shellHook =
let
icon = "f121";
in
''
export PS1="$(echo -e '\u${icon}') {\[$(tput sgr0)\]\[\033[38;5;228m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\]} (${name}) \\$ \[$(tput sgr0)\]"
'';
};
packages = {
default = vsdfPkg;
vsdf = vsdfPkg;
};
apps = {
default = {
type = "app";
program = "${vsdfPkg}/bin/vsdf";
};
vsdf = {
type = "app";
program = "${vsdfPkg}/bin/vsdf";
};
};
});
}