mslicer: forcibly link against wayland
this fixes the error that it can't find wayland, but now it complains about unsupported (graphics) features old error: ``` thread 'main' panicked at mslicer/src/main.rs:80:6: called `Result::unwrap()` on an `Err` value: WinitEventLoop(Os(OsError { line: 80, file: "/build/mslicer-0.2.0-vendor/winit-0.29.15/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoWaylandLib)) })) ``` new error: ``` thread 'main' panicked at mslicer/src/main.rs:80:6: called `Result::unwrap()` on an `Err` value: Wgpu(RequestDeviceError(RequestDeviceError { inner: Core(UnsupportedFeature(Features(POLYGON_MODE_LINE))) })) ```
This commit is contained in:
@@ -1,7 +1,16 @@
|
|||||||
|
# `result/bin/mslicer` fails with:
|
||||||
|
# called `Result::unwrap()` on an `Err` value: Wgpu(RequestDeviceError(RequestDeviceError { inner: Core(UnsupportedFeature(Features(POLYGON_MODE_LINE))) }))
|
||||||
{
|
{
|
||||||
lib,
|
|
||||||
rustPlatform,
|
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
|
lib,
|
||||||
|
libglvnd,
|
||||||
|
libxkbcommon,
|
||||||
|
pkg-config,
|
||||||
|
rustPlatform,
|
||||||
|
wayland,
|
||||||
|
wayland-scanner,
|
||||||
|
wayland-protocols,
|
||||||
|
wrapGAppsHook3,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
@@ -18,6 +27,43 @@ rustPlatform.buildRustPackage rec {
|
|||||||
cargoHash = "sha256-mRbEwxR6bMkybxe7H1dX4Qa1elGiw/lSSz9sSTtp1zw=";
|
cargoHash = "sha256-mRbEwxR6bMkybxe7H1dX4Qa1elGiw/lSSz9sSTtp1zw=";
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
# cmake
|
||||||
|
pkg-config
|
||||||
|
wayland-scanner
|
||||||
|
# wrapGAppsHook3 #< doesn't fix `POLYGON_MODE_LINE`
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
libglvnd
|
||||||
|
libxkbcommon
|
||||||
|
# openssl
|
||||||
|
wayland
|
||||||
|
wayland-protocols
|
||||||
|
];
|
||||||
|
|
||||||
|
# from pkgs/by-name/al/alvr/package.nix, to get it to actually link against wayland
|
||||||
|
# RUSTFLAGS = map (a: "-C link-arg=${a}") [
|
||||||
|
# "-Wl,--push-state,--no-as-needed"
|
||||||
|
# # "-lEGL"
|
||||||
|
# "-lwayland-client"
|
||||||
|
# # "-lxkbcommon"
|
||||||
|
# "-Wl,--pop-state"
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# Force linking to libEGL, which is always dlopen()ed, and to
|
||||||
|
# libwayland-client & libxkbcommon, which is dlopen()ed based on the
|
||||||
|
# winit backend.
|
||||||
|
# from <repo:nixos/nixpkgs:pkgs/by-name/uk/ukmm/package.nix>
|
||||||
|
NIX_LDFLAGS = [
|
||||||
|
"--push-state"
|
||||||
|
"--no-as-needed"
|
||||||
|
"-lEGL"
|
||||||
|
"-lwayland-client"
|
||||||
|
"-lxkbcommon"
|
||||||
|
"--pop-state"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "An experimental open source slicer for masked stereolithography (resin) printers.";
|
description = "An experimental open source slicer for masked stereolithography (resin) printers.";
|
||||||
homepage = "https://connorcode.com/projects/mslicer";
|
homepage = "https://connorcode.com/projects/mslicer";
|
||||||
|
Reference in New Issue
Block a user