File tree 1 file changed +46
-0
lines changed
1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -33,3 +33,49 @@ pkgs.mkShell rec {
33
33
builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
34
34
}
35
35
```
36
+
37
+ Alternatively, you can use this ` flake.nix ` to create a dev shell, activated by ` nix develop ` :
38
+
39
+ ``` nix
40
+ {
41
+ inputs = {
42
+ nixpkgs.url = "nixpkgs/nixos-unstable";
43
+ flake-utils.url = "github:numtide/flake-utils";
44
+ };
45
+
46
+ outputs = {
47
+ nixpkgs,
48
+ flake-utils,
49
+ ...
50
+ }:
51
+ flake-utils.lib.eachDefaultSystem (
52
+ system: let
53
+ pkgs = import nixpkgs {
54
+ inherit system;
55
+ };
56
+
57
+ buildInputs = with pkgs; [
58
+ expat
59
+ fontconfig
60
+ freetype
61
+ freetype.dev
62
+ libGL
63
+ pkg-config
64
+ xorg.libX11
65
+ xorg.libXcursor
66
+ xorg.libXi
67
+ xorg.libXrandr
68
+ wayland
69
+ libxkbcommon
70
+ ];
71
+ in {
72
+ devShells.default = pkgs.mkShell {
73
+ inherit buildInputs;
74
+
75
+ LD_LIBRARY_PATH =
76
+ builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
77
+ };
78
+ }
79
+ );
80
+ }
81
+ ```
You can’t perform that action at this time.
0 commit comments