1 { lib, stdenv, autoPatchelfHook, makeDesktopItem, copyDesktopItems, wrapGAppsHook, fetchurl
2 , alsa-lib, at-spi2-atk, at-spi2-core, atk, cairo, cups
3 , gtk3, nss, glib, dbus, nspr, gdk-pixbuf, libdrm, mesa
4 , libX11, libXScrnSaver, libXcomposite, libXcursor, libXdamage, libXext
5 , libXfixes, libXi, libXrandr, libXrender, libXtst, libxcb, libxshmfence, pango
9 stdenv.mkDerivation rec {
10 pname = "snapmaker-luban";
14 url = "https://github.com/Snapmaker/Luban/releases/download/v${version}/snapmaker-luban-${version}-linux-x64.tar.gz";
15 sha256 = "sha256-unxI0L8pcF6iWWa57GpYv/aYsApKAKfRaes3uXE7izM=";
39 mesa # Required for libgbm
44 libPath = lib.makeLibraryPath [
45 stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups
46 gdk-pixbuf glib gtk3 libX11 libXcomposite libxshmfence
47 libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender
48 libXtst nspr nss libxcb pango libXScrnSaver udev
51 autoPatchelfIgnoreMissingDeps = [
52 "libc.musl-x86_64.so.1"
62 mkdir -p $out/{bin,opt,share/pixmaps}/
65 patchelf --set-interpreter ${stdenv.cc.bintools.dynamicLinker} \
66 $out/opt/snapmaker-luban
68 wrapProgram $out/opt/snapmaker-luban \
69 "''${gappsWrapperArgs[@]}" \
70 --prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
71 --prefix LD_LIBRARY_PATH : ${libPath}:$out/snapmaker-luban
73 ln -s $out/opt/snapmaker-luban $out/bin/snapmaker-luban
74 ln -s $out/opt/resources/app/app/resources/images/snap-luban-logo-64x64.png $out/share/pixmaps/snapmaker-luban.png
82 exec = "snapmaker-luban";
83 icon = "snapmaker-luban";
84 desktopName = "Snapmaker Luban";
85 genericName = meta.description;
86 categories = [ "Office" "Printing" ];
91 description = "Snapmaker Luban is an easy-to-use 3-in-1 software tailor-made for Snapmaker machines";
92 homepage = "https://github.com/Snapmaker/Luban";
93 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
94 license = licenses.gpl3;
95 maintainers = [ maintainers.simonkampe ];
96 platforms = [ "x86_64-linux" ];
97 knownVulnerabilities = [ "CVE-2023-5217" ];