refac: workspace
This commit is contained in:
@@ -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 ];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user