ideamaker: init at 4.3.3

+250
+25
pkgs/by-name/id/ideamaker/mimetypes.xml
··· 1 + <?xml version="1.0" encoding="UTF-8"?> 2 + <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> 3 + <mime-type type="model/3mf"> 4 + <icon name="3MF"/> 5 + <generic-icon name="3MF"/> 6 + </mime-type> 7 + <mime-type type="application/x-ideamaker"> 8 + <glob pattern="*.idea"/> 9 + <comment xml:lang="en">IDEA project</comment> 10 + <icon name="IDEA"/> 11 + <generic-icon name="IDEA"/> 12 + </mime-type> 13 + <mime-type type="model/stl"> 14 + <icon name="STL"/> 15 + <generic-icon name="STL"/> 16 + </mime-type> 17 + <mime-type type="model/obj"> 18 + <icon name="OBJ"/> 19 + <generic-icon name="OBJ"/> 20 + </mime-type> 21 + <mime-type type="text/x.gcode"> 22 + <icon name="GCODE"/> 23 + <generic-icon name="GCODE"/> 24 + </mime-type> 25 + </mime-info>
+225
pkgs/by-name/id/ideamaker/package.nix
··· 1 + { 2 + stdenv, 3 + autoPatchelfHook, 4 + cacert, 5 + common-updater-scripts, 6 + curl, 7 + dpkg, 8 + fetchurl, 9 + fetchzip, 10 + lib, 11 + libcork, 12 + libGLU, 13 + libsForQt5, 14 + makeDesktopItem, 15 + openssl, 16 + shared-mime-info, 17 + writeShellApplication, 18 + }: 19 + stdenv.mkDerivation (finalAttrs: { 20 + pname = "ideamaker"; 21 + version = "4.3.3.6560"; 22 + src = 23 + let 24 + semver = lib.strings.concatStringsSep "." ( 25 + lib.lists.init (builtins.splitVersion finalAttrs.version) 26 + ); 27 + in 28 + fetchurl { 29 + url = "https://download.raise3d.com/${finalAttrs.pname}/release/${semver}/ideaMaker_${finalAttrs.version}-ubuntu_amd64.deb"; 30 + sha256 = "sha256-aTVWCTgnVKD16uhJUVz0vR7KPGJqCVj0xoL53Qi3IKM="; 31 + }; 32 + 33 + nativeBuildInputs = [ 34 + autoPatchelfHook 35 + dpkg 36 + shared-mime-info 37 + libsForQt5.wrapQtAppsHook 38 + ]; 39 + 40 + buildInputs = 41 + let 42 + # we need curl 7.47.0, as the app segfaults on launch in 7.47.1 and beyond 43 + # (tested with 7.47.1, 7.50.3, 7.62, 7.79.1, and 8.7.1) 44 + curl_7_47_0 = 45 + let 46 + openssl_1_0_1u = openssl.overrideAttrs (previous: { 47 + version = "1.0.1u"; 48 + src = fetchurl { 49 + url = "https://www.openssl.org/source/openssl-1.0.1u.tar.gz"; 50 + sha256 = "0fb7y9pwbd76pgzd7xzqfrzibmc0vf03sl07f34z5dhm2b5b84j3"; 51 + }; 52 + patches = [ ]; 53 + withDocs = false; 54 + outputs = lib.lists.remove "doc" previous.outputs; 55 + meta.knownVulnerabilities = [ 56 + "OpenSSL 1.0.1 reached its end of life 2016-12-31, see https://endoflife.software/applications/security-libraries/openssl." 57 + "CVE-2021-4044" 58 + "CVE-2016-7056" 59 + ]; 60 + }); 61 + in 62 + (curl.override { 63 + gnutlsSupport = true; 64 + gssSupport = false; 65 + http2Support = false; 66 + # while we use openssl, the configureFlag has since changed, so we manually set it below 67 + opensslSupport = false; 68 + pslSupport = false; 69 + scpSupport = false; 70 + }).overrideAttrs 71 + (previous: { 72 + version = "7.47.0"; 73 + src = fetchzip { 74 + url = "https://curl.se/download/curl-7.47.0.tar.lzma"; 75 + sha256 = "sha256-XlZk1nJbSmiQp7jMSE2QRCY4C9w2us8BgosBSzlD4dE="; 76 + }; 77 + configureFlags = previous.configureFlags ++ [ 78 + "--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt" 79 + "--with-ssl=${lib.getLib openssl_1_0_1u}" 80 + ]; 81 + patches = [ ]; 82 + # curl https://curl.se/docs/vuln-7.74.0.json | jq -r '.[].id' | sed 's/^/"/;s/$/"/' 83 + meta.knownVulnerabilities = [ 84 + "CURL-CVE-2024-2398" 85 + "CURL-CVE-2023-46218" 86 + "CURL-CVE-2023-38546" 87 + "CURL-CVE-2023-38545" 88 + "CURL-CVE-2023-28322" 89 + "CURL-CVE-2023-28321" 90 + "CURL-CVE-2023-28320" 91 + "CURL-CVE-2023-27538" 92 + "CURL-CVE-2023-27536" 93 + "CURL-CVE-2023-27535" 94 + "CURL-CVE-2023-27534" 95 + "CURL-CVE-2023-27533" 96 + "CURL-CVE-2023-23916" 97 + "CURL-CVE-2022-43552" 98 + "CURL-CVE-2022-32221" 99 + "CURL-CVE-2022-35252" 100 + "CURL-CVE-2022-32208" 101 + "CURL-CVE-2022-32207" 102 + "CURL-CVE-2022-32206" 103 + "CURL-CVE-2022-32205" 104 + "CURL-CVE-2022-27782" 105 + "CURL-CVE-2022-27781" 106 + "CURL-CVE-2022-27776" 107 + "CURL-CVE-2022-27775" 108 + "CURL-CVE-2022-27774" 109 + "CURL-CVE-2022-22576" 110 + "CURL-CVE-2021-22947" 111 + "CURL-CVE-2021-22946" 112 + "CURL-CVE-2021-22945" 113 + "CURL-CVE-2021-22926" 114 + "CURL-CVE-2021-22925" 115 + "CURL-CVE-2021-22924" 116 + "CURL-CVE-2021-22923" 117 + "CURL-CVE-2021-22922" 118 + "CURL-CVE-2021-22898" 119 + "CURL-CVE-2021-22897" 120 + "CURL-CVE-2021-22890" 121 + "CURL-CVE-2021-22876" 122 + ]; 123 + }); 124 + in 125 + [ 126 + (lib.getLib curl_7_47_0) 127 + libcork 128 + libGLU 129 + libsForQt5.qtbase 130 + libsForQt5.qtserialport 131 + libsForQt5.quazip 132 + ]; 133 + 134 + unpackPhase = '' 135 + runHook preUnpack 136 + dpkg-deb -x $src . 137 + runHook postUnpack 138 + ''; 139 + 140 + installPhase = '' 141 + runHook preInstall 142 + 143 + install -D usr/lib/x86_64-linux-gnu/ideamaker/ideamaker \ 144 + $out/bin/${finalAttrs.pname} 145 + 146 + patchelf --replace-needed libquazip.so.1 libquazip1-qt5.so \ 147 + $out/bin/${finalAttrs.pname} 148 + 149 + mimetypeDir=$out/share/icons/hicolor/128x128/mimetypes 150 + mkdir -p ''$mimetypeDir 151 + for file in usr/share/ideamaker/icons/*.ico; do 152 + mv $file ''$mimetypeDir/''$(basename ''${file%.ico}).png 153 + done 154 + install -D ${./mimetypes.xml} \ 155 + $out/share/mime/packages/${finalAttrs.pname}.xml 156 + 157 + install -D usr/share/ideamaker/icons/ideamaker-icon.png \ 158 + $out/share/pixmaps/${finalAttrs.pname}.png 159 + 160 + ln -s ${finalAttrs.desktopItem}/share/applications $out/share/ 161 + 162 + runHook postInstall 163 + ''; 164 + 165 + desktopItem = makeDesktopItem { 166 + name = finalAttrs.pname; 167 + exec = finalAttrs.pname; 168 + icon = finalAttrs.pname; 169 + desktopName = "Ideamaker"; 170 + comment = "ideaMaker - www.raise3d.com"; 171 + categories = [ 172 + "Qt" 173 + "Utility" 174 + "3DGraphics" 175 + "Viewer" 176 + "Engineering" 177 + ]; 178 + genericName = finalAttrs.meta.description; 179 + mimeTypes = [ 180 + "application/x-ideamaker" 181 + "model/3mf" 182 + "model/obj" 183 + "model/stl" 184 + "text/x.gcode" 185 + ]; 186 + noDisplay = false; 187 + startupNotify = true; 188 + terminal = false; 189 + type = "Application"; 190 + }; 191 + 192 + passthru.updateScript = lib.getExe (writeShellApplication { 193 + name = "ideamaker-update-script"; 194 + runtimeInputs = [ 195 + curl 196 + common-updater-scripts 197 + ]; 198 + text = '' 199 + set -eu -o pipefail 200 + 201 + release_page=$(mktemp) 202 + curl -s https://www.raise3d.com/download/ideamaker-all-versions/ > "$release_page" 203 + 204 + latest_stable_version=$( 205 + sed -nE '/Beta|Alpha/! s/.*Version ([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' "$release_page" | \ 206 + head -n 1 207 + ) 208 + 209 + latest_stable_build_number=$( 210 + sed -nE "s/.*ideaMaker_$latest_stable_version\.([0-9]+).*/\1/p" "$release_page" | head -n 1 211 + ) 212 + 213 + update-source-version ideamaker "$latest_stable_version.$latest_stable_build_number" 214 + ''; 215 + }); 216 + 217 + meta = { 218 + homepage = "https://www.raise3d.com/ideamaker/"; 219 + description = "Raise3D's 3D slicer software"; 220 + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 221 + license = lib.licenses.unfree; 222 + platforms = [ "x86_64-linux" ]; 223 + maintainers = with lib.maintainers; [ cjshearer ]; 224 + }; 225 + })