ideamaker: 4.3.3.6560 -> 5.2.2.8570 (#388453)
This commit is contained in:
@@ -1,144 +1,71 @@
|
|||||||
{
|
{
|
||||||
stdenv,
|
|
||||||
autoPatchelfHook,
|
autoPatchelfHook,
|
||||||
cacert,
|
|
||||||
common-updater-scripts,
|
common-updater-scripts,
|
||||||
|
copyDesktopItems,
|
||||||
curl,
|
curl,
|
||||||
dpkg,
|
dpkg,
|
||||||
|
e2fsprogs,
|
||||||
fetchurl,
|
fetchurl,
|
||||||
fetchzip,
|
gnutls,
|
||||||
|
gtk3,
|
||||||
|
jq,
|
||||||
lib,
|
lib,
|
||||||
libcork,
|
|
||||||
libGLU,
|
libGLU,
|
||||||
|
libpsl,
|
||||||
libsForQt5,
|
libsForQt5,
|
||||||
|
libredirect,
|
||||||
|
libX11,
|
||||||
|
lz4,
|
||||||
makeDesktopItem,
|
makeDesktopItem,
|
||||||
openssl,
|
makeWrapper,
|
||||||
|
nghttp2,
|
||||||
shared-mime-info,
|
shared-mime-info,
|
||||||
|
stdenv,
|
||||||
writeShellApplication,
|
writeShellApplication,
|
||||||
|
xkeyboardconfig,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
|
||||||
pname = "ideamaker";
|
|
||||||
version = "4.3.3.6560";
|
|
||||||
src =
|
|
||||||
let
|
let
|
||||||
semver = lib.strings.concatStringsSep "." (
|
pname = "ideamaker";
|
||||||
lib.lists.init (builtins.splitVersion finalAttrs.version)
|
version = "5.2.2.8570";
|
||||||
);
|
semver = lib.strings.concatStringsSep "." (lib.lists.init (builtins.splitVersion version));
|
||||||
|
description = "Raise3D's 3D slicer software";
|
||||||
in
|
in
|
||||||
fetchurl {
|
stdenv.mkDerivation {
|
||||||
url = "https://download.raise3d.com/ideamaker/release/${semver}/ideaMaker_${finalAttrs.version}-ubuntu_amd64.deb";
|
inherit pname version;
|
||||||
hash = "sha256-aTVWCTgnVKD16uhJUVz0vR7KPGJqCVj0xoL53Qi3IKM=";
|
src = fetchurl {
|
||||||
|
url = "https://downcdn.raise3d.com/ideamaker/release/${semver}/ideaMaker_${version}-ubuntu_amd64.deb";
|
||||||
|
hash = "sha256-kXcgVuuPTMWoOCrEztiedJrZrTbFx1xHyzzh4y2b0UA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
autoPatchelfHook
|
autoPatchelfHook
|
||||||
|
copyDesktopItems
|
||||||
dpkg
|
dpkg
|
||||||
|
makeWrapper
|
||||||
shared-mime-info
|
shared-mime-info
|
||||||
libsForQt5.wrapQtAppsHook
|
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
dontWrapQtApps = true;
|
||||||
let
|
|
||||||
# we need curl 7.47.0, as the app segfaults on launch in 7.47.1 and beyond
|
buildInputs = [
|
||||||
# (tested with 7.47.1, 7.50.3, 7.62, 7.79.1, and 8.7.1)
|
|
||||||
curl_7_47_0 =
|
|
||||||
let
|
|
||||||
openssl_1_0_1u = openssl.overrideAttrs (previous: {
|
|
||||||
version = "1.0.1u";
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://www.openssl.org/source/openssl-1.0.1u.tar.gz";
|
|
||||||
hash = "sha256-QxK0yhIVtvLJcAdQPYDbgNUVf3b499P+u+a0xW/yZzk=";
|
|
||||||
};
|
|
||||||
patches = [ ];
|
|
||||||
withDocs = false;
|
|
||||||
outputs = lib.lists.remove "doc" previous.outputs;
|
|
||||||
meta.knownVulnerabilities = [
|
|
||||||
"OpenSSL 1.0.1 reached its end of life 2016-12-31, see https://endoflife.software/applications/security-libraries/openssl."
|
|
||||||
"CVE-2021-4044"
|
|
||||||
"CVE-2016-7056"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
(curl.override {
|
|
||||||
gnutlsSupport = true;
|
|
||||||
gssSupport = false;
|
|
||||||
http2Support = false;
|
|
||||||
# while we use openssl, the configureFlag has since changed, so we manually set it below
|
|
||||||
opensslSupport = false;
|
|
||||||
pslSupport = false;
|
|
||||||
scpSupport = false;
|
|
||||||
}).overrideAttrs
|
|
||||||
(previous: {
|
|
||||||
version = "7.47.0";
|
|
||||||
src = fetchzip {
|
|
||||||
url = "https://curl.se/download/curl-7.47.0.tar.lzma";
|
|
||||||
hash = "sha256-XlZk1nJbSmiQp7jMSE2QRCY4C9w2us8BgosBSzlD4dE=";
|
|
||||||
};
|
|
||||||
configureFlags = previous.configureFlags ++ [
|
|
||||||
"--with-ca-bundle=${cacert}/etc/ssl/certs/ca-bundle.crt"
|
|
||||||
"--with-ssl=${lib.getLib openssl_1_0_1u}"
|
|
||||||
];
|
|
||||||
patches = [ ];
|
|
||||||
# curl https://curl.se/docs/vuln-7.74.0.json | jq -r '.[].id' | sed 's/^/"/;s/$/"/'
|
|
||||||
meta.knownVulnerabilities = [
|
|
||||||
"CURL-CVE-2024-2398"
|
|
||||||
"CURL-CVE-2023-46218"
|
|
||||||
"CURL-CVE-2023-38546"
|
|
||||||
"CURL-CVE-2023-38545"
|
|
||||||
"CURL-CVE-2023-28322"
|
|
||||||
"CURL-CVE-2023-28321"
|
|
||||||
"CURL-CVE-2023-28320"
|
|
||||||
"CURL-CVE-2023-27538"
|
|
||||||
"CURL-CVE-2023-27536"
|
|
||||||
"CURL-CVE-2023-27535"
|
|
||||||
"CURL-CVE-2023-27534"
|
|
||||||
"CURL-CVE-2023-27533"
|
|
||||||
"CURL-CVE-2023-23916"
|
|
||||||
"CURL-CVE-2022-43552"
|
|
||||||
"CURL-CVE-2022-32221"
|
|
||||||
"CURL-CVE-2022-35252"
|
|
||||||
"CURL-CVE-2022-32208"
|
|
||||||
"CURL-CVE-2022-32207"
|
|
||||||
"CURL-CVE-2022-32206"
|
|
||||||
"CURL-CVE-2022-32205"
|
|
||||||
"CURL-CVE-2022-27782"
|
|
||||||
"CURL-CVE-2022-27781"
|
|
||||||
"CURL-CVE-2022-27776"
|
|
||||||
"CURL-CVE-2022-27775"
|
|
||||||
"CURL-CVE-2022-27774"
|
|
||||||
"CURL-CVE-2022-22576"
|
|
||||||
"CURL-CVE-2021-22947"
|
|
||||||
"CURL-CVE-2021-22946"
|
|
||||||
"CURL-CVE-2021-22945"
|
|
||||||
"CURL-CVE-2021-22926"
|
|
||||||
"CURL-CVE-2021-22925"
|
|
||||||
"CURL-CVE-2021-22924"
|
|
||||||
"CURL-CVE-2021-22923"
|
|
||||||
"CURL-CVE-2021-22922"
|
|
||||||
"CURL-CVE-2021-22898"
|
|
||||||
"CURL-CVE-2021-22897"
|
|
||||||
"CURL-CVE-2021-22890"
|
|
||||||
"CURL-CVE-2021-22876"
|
|
||||||
];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
[
|
|
||||||
(lib.getLib curl_7_47_0)
|
|
||||||
libcork
|
|
||||||
libGLU
|
libGLU
|
||||||
|
lz4
|
||||||
|
e2fsprogs
|
||||||
|
gnutls
|
||||||
|
gtk3
|
||||||
|
nghttp2
|
||||||
|
libpsl
|
||||||
libsForQt5.qtbase
|
libsForQt5.qtbase
|
||||||
libsForQt5.qtserialport
|
libsForQt5.qt5.qtwayland
|
||||||
libsForQt5.quazip
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
runHook preInstall
|
runHook preInstall
|
||||||
|
|
||||||
install -D usr/lib/x86_64-linux-gnu/ideamaker/ideamaker \
|
mkdir -p $out/bin
|
||||||
$out/bin/ideamaker
|
|
||||||
|
|
||||||
patchelf --replace-needed libquazip.so.1 libquazip1-qt5.so \
|
cp -r usr $out
|
||||||
$out/bin/ideamaker
|
cp -r usr/share $out/share
|
||||||
|
|
||||||
mimetypeDir=$out/share/icons/hicolor/128x128/mimetypes
|
mimetypeDir=$out/share/icons/hicolor/128x128/mimetypes
|
||||||
mkdir -p ''$mimetypeDir
|
mkdir -p ''$mimetypeDir
|
||||||
@@ -151,12 +78,28 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
install -D usr/share/ideamaker/icons/ideamaker-icon.png \
|
install -D usr/share/ideamaker/icons/ideamaker-icon.png \
|
||||||
$out/share/pixmaps/ideamaker.png
|
$out/share/pixmaps/ideamaker.png
|
||||||
|
|
||||||
ln -s ${finalAttrs.desktopItem}/share/applications $out/share/
|
ln -sf $out/usr/lib/x86_64-linux-gnu/ideamaker/ideamaker $out/bin/ideamaker
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
preFixup = ''
|
||||||
|
wrapProgram $out/bin/ideamaker \
|
||||||
|
--set LD_PRELOAD "${libredirect}/lib/libredirect.so" \
|
||||||
|
--set QT_XKB_CONFIG_ROOT "${xkeyboardconfig}/share/X11/xkb" \
|
||||||
|
--set QTCOMPOSE "${libX11.out}/share/X11/locale" \
|
||||||
|
--set KDEDIRS "$HOME/.nix-profile:/nix/var/nix/profiles/default" \
|
||||||
|
--set NIX_REDIRECTS /usr/share=$out/share/
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
patchelf \
|
||||||
|
--add-needed libdbus-1.so.3 \
|
||||||
|
"$out/usr/lib/x86_64-linux-gnu/ideamaker/libQt5DBus.so.5.15.2"
|
||||||
|
'';
|
||||||
|
|
||||||
|
desktopItems = [
|
||||||
|
(makeDesktopItem {
|
||||||
name = "ideamaker";
|
name = "ideamaker";
|
||||||
exec = "ideamaker";
|
exec = "ideamaker";
|
||||||
icon = "ideamaker";
|
icon = "ideamaker";
|
||||||
@@ -169,7 +112,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
"Viewer"
|
"Viewer"
|
||||||
"Engineering"
|
"Engineering"
|
||||||
];
|
];
|
||||||
genericName = finalAttrs.meta.description;
|
genericName = description;
|
||||||
mimeTypes = [
|
mimeTypes = [
|
||||||
"application/x-ideamaker"
|
"application/x-ideamaker"
|
||||||
"model/3mf"
|
"model/3mf"
|
||||||
@@ -181,40 +124,33 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
startupNotify = true;
|
startupNotify = true;
|
||||||
terminal = false;
|
terminal = false;
|
||||||
type = "Application";
|
type = "Application";
|
||||||
};
|
})
|
||||||
|
];
|
||||||
|
|
||||||
passthru.updateScript = lib.getExe (writeShellApplication {
|
passthru.updateScript = lib.getExe (writeShellApplication {
|
||||||
name = "ideamaker-update-script";
|
name = "ideamaker-update-script";
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
curl
|
curl
|
||||||
common-updater-scripts
|
common-updater-scripts
|
||||||
|
jq
|
||||||
];
|
];
|
||||||
text = ''
|
text = ''
|
||||||
set -eu -o pipefail
|
update-source-version ideamaker "$(
|
||||||
|
curl 'https://api.raise3d.com/ideamakerio-v1.1/hq/ofpVersionControl/find' -X 'POST' \
|
||||||
release_page=$(mktemp)
|
| jq -r '.data.release_version.linux_64_deb_url' \
|
||||||
curl -s https://www.raise3d.com/download/ideamaker-all-versions/ > "$release_page"
|
| sed -E 's#.*/release/([0-9]+\.[0-9]+\.[0-9]+)/ideaMaker_\1\.([0-9]+).*#\1.\2#'
|
||||||
|
)"
|
||||||
latest_stable_version=$(
|
|
||||||
sed -nE '/Beta|Alpha/! s/.*Version ([0-9]+\.[0-9]+\.[0-9]+).*/\1/p' "$release_page" | \
|
|
||||||
head -n 1
|
|
||||||
)
|
|
||||||
|
|
||||||
latest_stable_build_number=$(
|
|
||||||
sed -nE "s/.*ideaMaker_$latest_stable_version\.([0-9]+).*/\1/p" "$release_page" | head -n 1
|
|
||||||
)
|
|
||||||
|
|
||||||
update-source-version ideamaker "$latest_stable_version.$latest_stable_build_number"
|
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://www.raise3d.com/ideamaker/";
|
inherit description;
|
||||||
changelog = "https://www.raise3d.com/download/ideamaker-release-notes/";
|
changelog = "https://www.raise3d.com/download/ideamaker-release-notes/";
|
||||||
description = "Raise3D's 3D slicer software";
|
homepage = "https://www.raise3d.com/ideamaker/";
|
||||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
|
||||||
license = lib.licenses.unfree;
|
license = lib.licenses.unfree;
|
||||||
platforms = [ "x86_64-linux" ];
|
mainProgram = "ideamaker";
|
||||||
maintainers = with lib.maintainers; [ cjshearer ];
|
maintainers = with lib.maintainers; [ cjshearer ];
|
||||||
|
platforms = [ "x86_64-linux" ];
|
||||||
|
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user