diff options
author | 2025-01-30 22:37:49 +0200 | |
---|---|---|
committer | 2025-01-30 22:37:49 +0200 | |
commit | fe41b3e7608c38ffa136e40c207d068a2b805998 (patch) | |
tree | 2511461c0b03a0839d268fccfe52da2310143f78 /DEPENDENCIES.md | |
parent | 30ee9d024d00403f2fc0571946fa9ca398117e05 (diff) | |
download | iced-fe41b3e7608c38ffa136e40c207d068a2b805998.tar.gz iced-fe41b3e7608c38ffa136e40c207d068a2b805998.tar.bz2 iced-fe41b3e7608c38ffa136e40c207d068a2b805998.zip |
Add a flake for a dev shell
Diffstat (limited to 'DEPENDENCIES.md')
-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; + }; + } + ); +} +``` |