refac: workspace

This commit is contained in:
2026-09-07 00:24:19 +01:00
parent c82b470b9e
commit bc5a26b728
11 changed files with 444 additions and 72 deletions
+22 -7
View File
@@ -72,9 +72,20 @@
};
strictDeps = true;
nativeBuildInputs = [
pkgs.pkg-config
];
nativeBuildInputs =
[
pkgs.pkg-config
]
++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [
pkgs.mold
];
# Link with mold (fast linker). Lives in commonArgs so deps and the
# final crate share one flag set; note this rebuilds all dependency
# crates once when first added.
env = pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
};
buildInputs =
guiLibs
@@ -112,12 +123,16 @@
# Put the GUI shared libraries on the runtime library path so winit
# can dlopen libwayland and wgpu can find the vulkan loader.
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath guiLibs}"
'';
shellHook =
''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath guiLibs}"
''
+ pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isLinux ''
export RUSTFLAGS="-C link-arg=-fuse-ld=mold"
'';
# Extra inputs can be added here; cargo and rustc are provided by default.
packages = guiLibs;
packages = guiLibs ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isLinux [ pkgs.mold ];
};
}
);