Merge pull request #306391 from kirillrdy/kr/bambu-studio

bambu-studio, orca-slicer: prevent collision of LICENSE

authored by

kirillrdy and committed by
GitHub
c115010a 6a81ca6b

+95 -78
+58 -55
pkgs/applications/misc/bambu-studio/default.nix
··· 1 - { stdenv 2 - , lib 3 - , openexr 4 - , jemalloc 5 - , c-blosc 6 - , binutils 7 - , fetchFromGitHub 8 - , cmake 9 - , pkg-config 10 - , wrapGAppsHook 11 - , boost179 12 - , cereal 13 - , cgal_5 14 - , curl 15 - , dbus 16 - , eigen 17 - , expat 18 - , gcc-unwrapped 19 - , glew 20 - , glfw 21 - , glib 22 - , glib-networking 23 - , gmp 24 - , gstreamer 25 - , gst-plugins-base 26 - , gst-plugins-bad 27 - , gst-plugins-good 28 - , gtest 29 - , gtk3 30 - , hicolor-icon-theme 31 - , ilmbase 32 - , libpng 33 - , mesa 34 - , mpfr 35 - , nlopt 36 - , opencascade-occt 37 - , openvdb 38 - , pcre 39 - , qhull 40 - , systemd 41 - , tbb_2021_11 42 - , webkitgtk 43 - , wxGTK31 44 - , xorg 45 - , fetchpatch 46 - , withSystemd ? stdenv.isLinux 1 + { 2 + stdenv, 3 + lib, 4 + openexr, 5 + jemalloc, 6 + c-blosc, 7 + binutils, 8 + fetchFromGitHub, 9 + cmake, 10 + pkg-config, 11 + wrapGAppsHook, 12 + boost179, 13 + cereal, 14 + cgal_5, 15 + curl, 16 + dbus, 17 + eigen, 18 + expat, 19 + gcc-unwrapped, 20 + glew, 21 + glfw, 22 + glib, 23 + glib-networking, 24 + gmp, 25 + gstreamer, 26 + gst-plugins-base, 27 + gst-plugins-bad, 28 + gst-plugins-good, 29 + gtest, 30 + gtk3, 31 + hicolor-icon-theme, 32 + ilmbase, 33 + libpng, 34 + mesa, 35 + mpfr, 36 + nlopt, 37 + opencascade-occt, 38 + openvdb, 39 + pcre, 40 + qhull, 41 + systemd, 42 + tbb_2021_11, 43 + webkitgtk, 44 + wxGTK31, 45 + xorg, 46 + fetchpatch, 47 + withSystemd ? stdenv.isLinux, 47 48 }: 48 49 let 49 50 wxGTK31' = wxGTK31.overrideAttrs (old: { ··· 53 54 ]; 54 55 }); 55 56 openvdb_tbb_2021_8 = openvdb.overrideAttrs (old: rec { 56 - buildInputs = [ openexr boost179 tbb_2021_11 jemalloc c-blosc ilmbase ]; 57 + buildInputs = [ 58 + openexr 59 + boost179 60 + tbb_2021_11 61 + jemalloc 62 + c-blosc 63 + ilmbase 64 + ]; 57 65 }); 58 66 in 59 67 stdenv.mkDerivation rec { ··· 106 114 webkitgtk 107 115 wxGTK31' 108 116 xorg.libX11 109 - ] ++ lib.optionals withSystemd [ 110 - systemd 111 - ] ++ checkInputs; 117 + ] ++ lib.optionals withSystemd [ systemd ] ++ checkInputs; 112 118 113 119 patches = [ 114 120 # Fix for webkitgtk linking ··· 169 175 # needed to prevent collisions between the LICENSE.txt files of 170 176 # bambu-studio and orca-slicer. 171 177 postInstall = '' 172 - mkdir -p $out/share/doc 173 - mv $out/LICENSE.txt $out/share/doc/LICENSE.txt 174 - if [ -f $out/README.md ]; then 175 - mv $out/README.md $out/share/doc/README.md 176 - fi 178 + mv $out/LICENSE.txt $out/share/BambuStudio/LICENSE.txt 179 + mv $out/README.md $out/share/BambuStudio/README.md 177 180 ''; 178 181 179 182 meta = with lib; {
+37 -23
pkgs/applications/misc/bambu-studio/orca-slicer.nix
··· 1 - { lib, fetchFromGitHub, makeDesktopItem, bambu-studio }: 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + bambu-studio, 5 + }: 2 6 3 - bambu-studio.overrideAttrs (finalAttrs: previousAttrs: { 4 - version = "2.0.0"; 5 - pname = "orca-slicer"; 7 + bambu-studio.overrideAttrs ( 8 + finalAttrs: previousAttrs: { 9 + version = "2.0.0"; 10 + pname = "orca-slicer"; 6 11 7 - # Don't inherit patches from bambu-studio 8 - patches = [ 9 - ./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch 10 - ]; 12 + # Don't inherit patches from bambu-studio 13 + patches = [ ./0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch ]; 11 14 12 - src = fetchFromGitHub { 13 - owner = "SoftFever"; 14 - repo = "OrcaSlicer"; 15 - rev = "v${finalAttrs.version}"; 16 - hash = "sha256-YlLDUH3ODIfax5QwnsVJi1JjZ9WtxP3ssqRP1C4d4bw="; 17 - }; 15 + src = fetchFromGitHub { 16 + owner = "SoftFever"; 17 + repo = "OrcaSlicer"; 18 + rev = "v${finalAttrs.version}"; 19 + hash = "sha256-YlLDUH3ODIfax5QwnsVJi1JjZ9WtxP3ssqRP1C4d4bw="; 20 + }; 18 21 19 - meta = with lib; { 20 - description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc"; 21 - homepage = "https://github.com/SoftFever/OrcaSlicer"; 22 - license = licenses.agpl3Only; 23 - maintainers = with maintainers; [ zhaofengli ovlach pinpox ]; 24 - mainProgram = "orca-slicer"; 25 - platforms = platforms.linux; 26 - }; 27 - }) 22 + # needed to prevent collisions between the LICENSE.txt files of 23 + # bambu-studio and orca-slicer. 24 + postInstall = '' 25 + mv $out/LICENSE.txt $out/share/OrcaSlicer/LICENSE.txt 26 + ''; 27 + 28 + meta = with lib; { 29 + description = "G-code generator for 3D printers (Bambu, Prusa, Voron, VzBot, RatRig, Creality, etc"; 30 + homepage = "https://github.com/SoftFever/OrcaSlicer"; 31 + license = licenses.agpl3Only; 32 + maintainers = with maintainers; [ 33 + zhaofengli 34 + ovlach 35 + pinpox 36 + ]; 37 + mainProgram = "orca-slicer"; 38 + platforms = platforms.linux; 39 + }; 40 + } 41 + )