Merge pull request #2769 from rotmh/patch-1
Add a flake for a dev shell
This commit is contained in:
commit
e14a6f76e9
1 changed files with 46 additions and 0 deletions
|
|
@ -33,3 +33,49 @@ pkgs.mkShell rec {
|
|||
builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, you can use this `flake.nix` to create a dev shell, activated by `nix develop`:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
...
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
expat
|
||||
fontconfig
|
||||
freetype
|
||||
freetype.dev
|
||||
libGL
|
||||
pkg-config
|
||||
xorg.libX11
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXrandr
|
||||
wayland
|
||||
libxkbcommon
|
||||
];
|
||||
in {
|
||||
devShells.default = pkgs.mkShell {
|
||||
inherit buildInputs;
|
||||
|
||||
LD_LIBRARY_PATH =
|
||||
builtins.foldl' (a: b: "${a}:${b}/lib") "${pkgs.vulkan-loader}/lib" buildInputs;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue