nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 fetchFromGitHub,
3 lib,
4 libglvnd,
5 libxkbcommon,
6 nix-update-script,
7 rustPlatform,
8 vulkan-loader,
9 wayland,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "mslicer";
14 version = "0.2.2";
15
16 src = fetchFromGitHub {
17 owner = "connorslade";
18 repo = "mslicer";
19 rev = finalAttrs.version;
20 hash = "sha256-37EOdMM/stMKwTTpQ0LWYZVUw2Y3CkoEGHWNthyQnSA=";
21 };
22
23 cargoHash = "sha256-nkNoyoMqcFLCuQ8TqRn4e5L2zbgjw615HIAuLVqg0vQ=";
24
25 buildInputs = [
26 libglvnd
27 libxkbcommon
28 vulkan-loader
29 wayland
30 ];
31
32 # Force linking to libEGL, which is always dlopen()ed, and to
33 # libwayland-client & libxkbcommon, which is dlopen()ed based on the
34 # winit backend.
35 NIX_LDFLAGS = [
36 "--no-as-needed"
37 "-lEGL"
38 "-lvulkan"
39 "-lwayland-client"
40 "-lxkbcommon"
41 ];
42
43 strictDeps = true;
44
45 passthru.updateScript = nix-update-script { };
46
47 meta = {
48 description = "Experimental open source slicer for masked stereolithography (resin) printers";
49 homepage = "https://connorcode.com/projects/mslicer";
50 changelog = "https://github.com/connorslade/mslicer/releases/tag/${finalAttrs.version}";
51 license = lib.licenses.gpl3Plus;
52 maintainers = with lib.maintainers; [ colinsane ];
53 platforms = lib.platforms.linux;
54 };
55})