Skip to content

Commit fe41b3e

Browse files
authored
Add a flake for a dev shell
1 parent 30ee9d0 commit fe41b3e

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

DEPENDENCIES.md

+46
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,49 @@ pkgs.mkShell rec {
3333
builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
3434
}
3535
```
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+
```

0 commit comments

Comments
 (0)