some modularizing and refactoring

This commit is contained in:
cnst
2024-10-24 18:49:49 +02:00
parent 7f9d5c000f
commit ca0dc208e0
25 changed files with 248 additions and 227 deletions

58
nix/shell/default.nix Normal file
View File

@@ -0,0 +1,58 @@
{
inputs,
pkgs ? import <nixpkgs> {},
...
}: {
default = pkgs.mkShell {
# Add Rust toolchain from Fenix and rust-analyzer-nightly
packages = [
(inputs.fenix.packages.${pkgs.stdenv.hostPlatform.system}.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
];
nativeBuildInputs = with pkgs; [
# Build tools
cmake # Build system generator
gnumake # GNU Make
pkg-config # Manages library paths during compilation
perl # Scripting language, sometimes needed during builds
# Version control
git # Version control system
# Auto-patching (include if needed)
autoPatchelfHook # Automatically patches ELF binaries
# Scripting languages (include if needed)
# nodejs # JavaScript runtime environment
];
buildInputs = with pkgs; [
# Graphics and UI libraries
aquamarine # Aquamarine compositor library for Wayland
egl-wayland # EGLStream-based Wayland platform
wayland # Wayland client library
wayland-protocols # Wayland protocols for Wayland applications
gtk3
# Cryptography
openssl # TLS/SSL library for networking and encryption
];
shellHook = ''
# Set LD_LIBRARY_PATH if needed (temporary fix)
# export LD_LIBRARY_PATH="${pkgs.openssl.out}/lib:$LD_LIBRARY_PATH"
# Set SHELL to zsh if available
export SHELL=$(which zsh)
if [ "$SHELL" != "$(which zsh)" ]; then
exec $SHELL
fi
'';
};
}