initial commit

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I4a6b498153eccd5407510dd541b7f4816a6a6964
This commit is contained in:
raf 2026-01-30 22:05:46 +03:00
commit 6a73d11c4b
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
124 changed files with 34856 additions and 0 deletions

81
nix/shell.nix Normal file
View file

@ -0,0 +1,81 @@
{
pkgs,
rust-bin,
# rust-overlay params
extraComponents ? [],
extraTargets ? [],
}:
pkgs.mkShell {
name = "mercant-devshell";
packages = [
pkgs.taplo # TOML formatter
pkgs.lldb # debugger
pkgs.rust-analyzer-unwrapped # LSP
pkgs.llvm
pkgs.libiconv
# Additional Cargo Tooling
pkgs.cargo-nextest
pkgs.cargo-deny
# Build tools
# We use the rust-overlay to get the stable Rust toolchain for various targets.
# This is not exactly necessary, but it allows for compiling for various targets
# with the least amount of friction.
(rust-bin.nightly.latest.default.override {
extensions = ["rustfmt" "rust-analyzer" "clippy"] ++ extraComponents;
targets =
[
"wasm32-unknown-unknown" # web
]
++ extraTargets;
})
# Link with Clang & lld
pkgs.clang
pkgs.lld
# Handy CLI for packaging Dioxus apps and such
pkgs.dioxus-cli
# Dioxus desktop dependencies (GTK/WebKit)
pkgs.pkg-config
pkgs.glib
pkgs.gtk3
pkgs.webkitgtk_4_1
pkgs.libsoup_3
pkgs.cairo
pkgs.pango
pkgs.gdk-pixbuf
pkgs.atk
pkgs.xdotool # provides libxdo
pkgs.openssl
pkgs.kdePackages.wayland
];
env = {
# Allow Cargo to use lld and clang properly
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
RUSTFLAGS = "-C link-arg=-fuse-ld=lld";
# 'cargo llvm-cov' reads these environment variables to find these
# binaries, which are needed to run the tests.
LLVM_COV = "${pkgs.llvm}/bin/llvm-cov";
LLVM_PROFDATA = "${pkgs.llvm}/bin/llvm-profdata";
# Runtime library path for GTK/WebKit/xdotool
LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath [
pkgs.xdotool
pkgs.gtk3
pkgs.webkitgtk_4_1
pkgs.glib
pkgs.cairo
pkgs.pango
pkgs.gdk-pixbuf
pkgs.atk
pkgs.libsoup_3
pkgs.openssl
pkgs.kdePackages.wayland
]}";
};
}