Did not work. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I09802cd4835347115ba51bdffd0af1096a6a6964
69 lines
2 KiB
Nix
69 lines
2 KiB
Nix
{
|
|
lib,
|
|
pkgs,
|
|
rust-bin,
|
|
}: let
|
|
inherit (pkgs.rustc) llvmPackages;
|
|
|
|
# Dioxus desktop dependencies (GTK/WebKit)
|
|
runtimeDeps = [
|
|
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
|
|
pkgs.libiconv
|
|
];
|
|
in
|
|
pkgs.mkShell {
|
|
name = "pinakes-dev";
|
|
packages =
|
|
[
|
|
# 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. The extensions are to make sure all tooling
|
|
# uses the same Rust version and the general surrounding tooling.
|
|
(rust-bin.nightly.latest.default.override {
|
|
extensions = ["rustfmt" "rust-src" "rust-analyzer" "clippy" "rust-analyzer"];
|
|
targets = ["wasm32-unknown-unknown" "wasm32-wasip1"]; # web + plugins
|
|
})
|
|
|
|
# Modern, LLVM based linking pipeline. Kind of sucks on Windows, though.
|
|
llvmPackages.lld
|
|
llvmPackages.clang
|
|
|
|
# CLI helpers
|
|
pkgs.dioxus-cli # for packaging Dioxus apps and such
|
|
pkgs.just # general command runner for everything
|
|
|
|
# Additional Cargo Tooling
|
|
pkgs.cargo-nextest
|
|
pkgs.cargo-deny
|
|
|
|
# Other tools
|
|
pkgs.taplo # TOML formatter
|
|
pkgs.lldb # debugger
|
|
]
|
|
++ runtimeDeps;
|
|
|
|
env = {
|
|
# Allow Cargo to use lld and clang properly
|
|
LIBCLANG_PATH = "${llvmPackages.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 = "${llvmPackages.llvm}/bin/llvm-cov";
|
|
LLVM_PROFDATA = "${llvmPackages.llvm}/bin/llvm-profdata";
|
|
|
|
# Runtime library path for GTK/WebKit/xdotool
|
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath runtimeDeps}";
|
|
};
|
|
}
|