From 6655ee4f8a2b5af569cfbe6202016ce584e86ea2 Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 6 Apr 2025 09:02:58 +0000 Subject: [PATCH] mslicer: init at 0.2.1 Co-authored-by: awwpotato <153149335+awwpotato@users.noreply.github.com> Co-authored-by: Nurali Aslanbekov --- pkgs/by-name/ms/mslicer/package.nix | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 pkgs/by-name/ms/mslicer/package.nix diff --git a/pkgs/by-name/ms/mslicer/package.nix b/pkgs/by-name/ms/mslicer/package.nix new file mode 100644 index 000000000000..9f288a65925f --- /dev/null +++ b/pkgs/by-name/ms/mslicer/package.nix @@ -0,0 +1,55 @@ +{ + fetchFromGitHub, + lib, + libglvnd, + libxkbcommon, + nix-update-script, + rustPlatform, + vulkan-loader, + wayland, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "mslicer"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "connorslade"; + repo = "mslicer"; + rev = finalAttrs.version; + hash = "sha256-VgbHFUQpxlQcYh3TNyw1IX7vyaWrHRxl4Oe5jake9Qg="; + }; + + cargoHash = "sha256-Bs/mQTMEQxRvKK9ibIAf4KLv9jzGv3hnduXFYEdjljc="; + + buildInputs = [ + libglvnd + libxkbcommon + vulkan-loader + wayland + ]; + + # Force linking to libEGL, which is always dlopen()ed, and to + # libwayland-client & libxkbcommon, which is dlopen()ed based on the + # winit backend. + NIX_LDFLAGS = [ + "--no-as-needed" + "-lEGL" + "-lvulkan" + "-lwayland-client" + "-lxkbcommon" + ]; + + strictDeps = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Experimental open source slicer for masked stereolithography (resin) printers"; + homepage = "https://connorcode.com/projects/mslicer"; + changelog = "https://github.com/connorslade/mslicer/releases/tag/${finalAttrs.version}"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ colinsane ]; + platforms = lib.platforms.linux; + }; +})