diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-12-09 18:55:19 +0000 |
commit | 80d90d9b204f7c17912740f9f414fe5d59f293ba (patch) | |
tree | 5f2065a06e724270610760d59d01c6888b375a46 /infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix | |
parent | 3a31a84c7d3e589035ad08499206aac44a81f424 (diff) | |
parent | 83cbad92d73216bb0d9187c56cce0b91f9121d5a (diff) |
Merge commit '83cbad92d73216bb0d9187c56cce0b91f9121d5a' into main
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix b/infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix new file mode 100644 index 000000000000..7b2eeec292bf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/applications/misc/ideamaker/default.nix @@ -0,0 +1,77 @@ +{ stdenv +, autoPatchelfHook +, curl +, dpkg +, fetchurl +, gcc +, lib +, libGLU +, libcork +, makeDesktopItem +, qt5 +, quazip_qt4 +, zlib +}: +stdenv.mkDerivation rec { + pname = "ideamaker"; + version = "4.0.1"; + + src = fetchurl { + # N.B. Unfortunately ideamaker adds a number after the patch number in + # their release scheme which is not referenced anywhere other than in + # the download URL. Because of this, I have chosen to not use ${version} + # and just handwrite the correct values in the following URL, hopefully + # avoiding surprises for the next person that comes to update this + # package. + url = "https://download.raise3d.com/ideamaker/release/4.0.1/ideaMaker_4.0.1.4802-ubuntu_amd64.deb"; + sha256 = "0a1jcakdglcr4kz0kyq692dbjk6aq2yqcp3i6gzni91k791h49hp"; + }; + + nativeBuildInputs = [ autoPatchelfHook dpkg qt5.wrapQtAppsHook ]; + buildInputs = [ + curl + gcc.cc.lib + libGLU + libcork + qt5.qtbase + qt5.qtserialport + quazip_qt4 + zlib + ]; + + unpackPhase = '' + runHook preUnpack + dpkg-deb -x $src . + runHook postUnpack + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{bin,share/pixmaps} + + cp usr/lib/x86_64-linux-gnu/ideamaker/ideamaker $out/bin + ln -s "${desktopItem}/share/applications" $out/share/ + cp usr/share/ideamaker/icons/ideamaker-icon.png $out/share/pixmaps/${pname}.png + + runHook postInstall + ''; + + desktopItem = makeDesktopItem { + name = pname; + exec = pname; + icon = pname; + desktopName = "Ideamaker"; + genericName = meta.description; + categories = "Utility;Viewer;Engineering;"; + mimeType = "application/sla"; + }; + + meta = with lib; { + homepage = "https://www.raise3d.com/ideamaker/"; + description = "Raise3D's 3D slicer software"; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + maintainers = with maintainers; [ lovesegfault ]; + }; +} |