Desktop: Enable GPU nodes (#3364)

* desktop simple nix ci

* make workflow manual

* fixup

* fix nix shell

* nix fmt

* fix shell
This commit is contained in:
Timon
2025-11-16 22:37:02 +00:00
committed by GitHub
parent 94414adaf8
commit ebb434692a
18 changed files with 509 additions and 254 deletions

View File

@@ -11,20 +11,32 @@
};
};
outputs = {self, nixpkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem ( system:
outputs =
{
self,
nixpkgs,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
};
toolchain = pkgs.rust-bin.stable.latest.default.override {
extensions = ["rust-src" "clippy" "rust-analyzer"];
extensions = [
"rust-src"
"clippy"
"rust-analyzer"
];
};
buildInputs = with pkgs; [
llvm
llvm
];
in {
in
{
devShells.default = pkgs.mkShell {
stdenv = pkgs.clangStdenv;
packages = with pkgs; [
@@ -40,7 +52,7 @@
cargo
];
inherit buildInputs;
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
};
}

View File

@@ -33,42 +33,54 @@ let
rustc-wasm = pkgs.rust-bin.stable.latest.default.override {
targets = [ "wasm32-unknown-unknown" ];
# wasm-pack needs this
extensions = [ "rust-src" "rust-analyzer" "clippy"];
extensions = [
"rust-src"
"rust-analyzer"
"clippy"
];
};
in
# Make a shell with the dependencies we need
pkgs.mkShell {
packages = with pkgs; [
rustc-wasm
nodejs
cargo
cargo-watch
cargo-nextest
cargo-expand
wasm-pack
binaryen
wasm-bindgen-cli
vulkan-loader
libxkbcommon
llvm
gcc-unwrapped.lib
llvmPackages.libcxxStdenv
pkg-config
# used for profiling
gnuplot
samply
cargo-flamegraph
# Make a shell with the dependencies we need
pkgs.mkShell {
packages = with pkgs; [
rustc-wasm
nodejs
cargo
cargo-watch
cargo-nextest
cargo-expand
wasm-pack
binaryen
wasm-bindgen-cli
vulkan-loader
libxkbcommon
llvm
gcc-unwrapped.lib
llvmPackages.libcxxStdenv
pkg-config
# used for profiling
gnuplot
samply
cargo-flamegraph
# For Rawkit tests
libraw
# For Rawkit tests
libraw
# Use Mold as a linker
mold
];
# Use Mold as a linker
mold
];
# Hacky way to run Cargo through Mold
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [pkgs.openssl pkgs.vulkan-loader pkgs.libxkbcommon pkgs.llvmPackages.libcxxStdenv pkgs.gcc-unwrapped.lib pkgs.llvm pkgs.libraw];
shellHook = ''
# Hacky way to run Cargo through Mold
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.openssl
pkgs.vulkan-loader
pkgs.libxkbcommon
pkgs.llvmPackages.libcxxStdenv
pkgs.gcc-unwrapped.lib
pkgs.llvm
pkgs.libraw
];
shellHook = ''
alias cargo='mold --run cargo'
'';
}
'';
}