diff options
author | 2025-02-01 23:04:47 +0100 | |
---|---|---|
committer | 2025-02-01 23:04:47 +0100 | |
commit | e14a6f76e92c29745dae0d29344b1cee6915b16c (patch) | |
tree | 6092874c4c07b265d729f7dfa710539481eb2a7f | |
parent | 952c47bc8a1144e8b7636b645236474ebc0fa14c (diff) | |
parent | fe41b3e7608c38ffa136e40c207d068a2b805998 (diff) | |
download | iced-e14a6f76e92c29745dae0d29344b1cee6915b16c.tar.gz iced-e14a6f76e92c29745dae0d29344b1cee6915b16c.tar.bz2 iced-e14a6f76e92c29745dae0d29344b1cee6915b16c.zip |
Merge pull request #2769 from rotmh/patch-1
Add a flake for a dev shell
Diffstat (limited to '')
-rw-r--r-- | DEPENDENCIES.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 87fd8c7c..6ae9995e 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -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; + }; + } + ); +} +``` |