nix/home/config/template/Rust.nix

39 lines
720 B
Nix
Raw Normal View History

2024-03-10 11:42:33 +03:00
{
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 = nixpkgs.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}";
2024-06-22 23:34:03 +03:00
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
2024-03-10 11:42:33 +03:00
};
};
}