Flake : Add template for Rust.

This commit is contained in:
Dmitry Voronin 2024-02-07 00:52:42 +03:00
parent 1e3169125c
commit 745a2fc9b5

View file

@ -0,0 +1,38 @@
{
description = "Rust shell env.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs } @inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
in {
devShell.${system} = pkgs.mkShell rec {
nativeBuildInputs = with pkgs; [
cargo
rustc
rust-analyzer
rustfmt
cmake
pkg-config
fontconfig
];
buildInputs = with pkgs; [
libxkbcommon
wayland
libGL
xorg.libX11
xorg.libXrandr
xorg.libXinerama
xorg.libXcursor
xorg.libXi
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
};
};
}