nix/home/config/template/Rust.nix

42 lines
878 B
Nix
Raw Normal View History

2024-03-10 11:42:33 +03:00
{
description = "Rust shell env.";
2024-03-10 11:42:33 +03:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
2024-03-10 11:42:33 +03:00
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
2024-03-10 11:42:33 +03:00
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}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
2024-03-10 11:42:33 +03:00
}