anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / misc / bambu-studio / orca-slicer.nix
blob7e5c1f48ccd42bfae9998d35b672719edce9bd26
2   lib,
3   fetchFromGitHub,
4   bambu-studio,
5 }:
6 bambu-studio.overrideAttrs (
7   finalAttrs: previousAttrs: {
8     version = "2.2.0";
9     pname = "orca-slicer";
11     src = fetchFromGitHub {
12       owner = "SoftFever";
13       repo = "OrcaSlicer";
14       rev = "v${finalAttrs.version}";
15       hash = "sha256-h+cHWhrp894KEbb3ic2N4fNTn13WlOSYoMsaof0RvRI=";
16     };
18     patches = [
19       # Fix for webkitgtk linking
20       ./patches/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
22       ./patches/dont-link-opencv-world-orca.patch
23     ];
25     preFixup = ''
26       gappsWrapperArgs+=(
27         # Fixes blackscreen dialogs
28         --set WEBKIT_DISABLE_COMPOSITING_MODE 1
29       )
30     '';
32     # needed to prevent collisions between the LICENSE.txt files of
33     # bambu-studio and orca-slicer.
34     postInstall = ''
35       mv $out/LICENSE.txt $out/share/OrcaSlicer/LICENSE.txt
36     '';
38     meta = with lib; {
39       description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc.)";
40       homepage = "https://github.com/SoftFever/OrcaSlicer";
41       license = licenses.agpl3Only;
42       maintainers = with maintainers; [
43         zhaofengli
44         ovlach
45         pinpox
46       ];
47       mainProgram = "orca-slicer";
48       platforms = platforms.linux;
49     };
50   }