diff options
Diffstat (limited to 'pkgs/applications/graphics')
-rw-r--r-- | pkgs/applications/graphics/cloudcompare/default.nix | 46 | ||||
-rw-r--r-- | pkgs/applications/graphics/displaycal/default.nix | 75 | ||||
-rw-r--r-- | pkgs/applications/graphics/drawio/default.nix | 8 | ||||
-rw-r--r-- | pkgs/applications/graphics/opentoonz/default.nix | 104 | ||||
-rw-r--r-- | pkgs/applications/graphics/opentoonz/libtiff.nix | 56 | ||||
-rw-r--r-- | pkgs/applications/graphics/opentoonz/source.nix | 16 | ||||
-rw-r--r-- | pkgs/applications/graphics/pikopixel/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/graphics/structorizer/default.nix | 4 |
8 files changed, 142 insertions, 169 deletions
diff --git a/pkgs/applications/graphics/cloudcompare/default.nix b/pkgs/applications/graphics/cloudcompare/default.nix index 1ad3476e8091..e78b95c363b6 100644 --- a/pkgs/applications/graphics/cloudcompare/default.nix +++ b/pkgs/applications/graphics/cloudcompare/default.nix @@ -2,6 +2,8 @@ , stdenv , mkDerivation , fetchFromGitHub +, makeDesktopItem +, copyDesktopItems , cmake , boost , cgal @@ -23,13 +25,13 @@ mkDerivation rec { pname = "cloudcompare"; - version = "2.13"; + version = "2.13.1"; src = fetchFromGitHub { owner = "CloudCompare"; repo = "CloudCompare"; rev = "v${version}"; - hash = "sha256-tCmIdajizaTT1tvPA7YQoklfz7pYVKS0lJXrxV2fidg="; + hash = "sha256-QQwQt63tXxJnGaBLu+GvWkEazumYPhXnDe+giSu7wjk="; fetchSubmodules = true; }; @@ -37,6 +39,7 @@ mkDerivation rec { cmake eigen # header-only wrapGAppsHook + copyDesktopItems ]; buildInputs = [ @@ -96,12 +99,15 @@ mkDerivation rec { dontWrapGApps = true; postInstall = '' - install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.png -t $out/share/icons/hicolor/256x256/apps - install -Dm444 $src/snap/gui/{ccViewer,cloudcompare}.desktop -t $out/share/applications - substituteInPlace $out/share/applications/{ccViewer,cloudcompare}.desktop \ - --replace 'Exec=cloudcompare.' 'Exec=' \ - --replace 'Icon=''${SNAP}/meta/gui/' 'Icon=' \ - --replace '.png' "" + install -Dm444 $src/qCC/images/icon/cc_icon_16.png $out/share/icons/hicolor/16x16/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_32.png $out/share/icons/hicolor/32x32/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_64.png $out/share/icons/hicolor/64x64/apps/CloudCompare.png + install -Dm444 $src/qCC/images/icon/cc_icon_256.png $out/share/icons/hicolor/256x256/apps/CloudCompare.png + + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_16.png $out/share/icons/hicolor/16x16/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_32.png $out/share/icons/hicolor/32x32/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_64.png $out/share/icons/hicolor/64x64/apps/ccViewer.png + install -Dm444 $src/qCC/images/icon/cc_viewer_icon_256.png $out/share/icons/hicolor/256x256/apps/ccViewer.png ''; # fix file dialogs crashing on non-NixOS (and avoid double wrapping) @@ -109,11 +115,35 @@ mkDerivation rec { qtWrapperArgs+=("''${gappsWrapperArgs[@]}") ''; + desktopItems = [ + (makeDesktopItem { + name = "CloudCompare"; + desktopName = "CloudCompare"; + comment = "3D point cloud and mesh processing software"; + exec = "CloudCompare"; + terminal = false; + categories = [ "Graphics" "3DGraphics" "Viewer" ]; + keywords = [ "3d" "processing" ]; + icon = "CloudCompare"; + }) + (makeDesktopItem { + name = "ccViewer"; + desktopName = "CloudCompare Viewer"; + comment = "3D point cloud and mesh processing software"; + exec = "ccViewer"; + terminal = false; + categories = [ "Graphics" "3DGraphics" "Viewer" ]; + keywords = [ "3d" "viewer" ]; + icon = "ccViewer"; + }) + ]; + meta = with lib; { description = "3D point cloud and mesh processing software"; homepage = "https://cloudcompare.org"; license = licenses.gpl2Plus; maintainers = with maintainers; [ nh2 ]; + mainProgram = "CloudCompare"; platforms = with platforms; linux; # only tested here; might work on others }; } diff --git a/pkgs/applications/graphics/displaycal/default.nix b/pkgs/applications/graphics/displaycal/default.nix deleted file mode 100644 index 0eef148398cb..000000000000 --- a/pkgs/applications/graphics/displaycal/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ lib -, python3 -, fetchPypi -, wrapGAppsHook -, gtk3 -, librsvg -, xorg -, argyllcms -}: - -python3.pkgs.buildPythonApplication rec { - pname = "displaycal"; - version = "3.9.11"; - format = "setuptools"; - - src = fetchPypi { - pname = "DisplayCAL"; - inherit version; - hash = "sha256-zAZW2eMjwRYevlz8KEzTxzGO8vx5AydfY3vGTapNo1c="; - }; - - nativeBuildInputs = [ - wrapGAppsHook - gtk3 - ]; - - propagatedBuildInputs = with python3.pkgs; [ - build - certifi - wxpython - dbus-python - distro - numpy - pillow - pychromecast - send2trash - zeroconf - ]; - - buildInputs = [ - gtk3 - librsvg - ] ++ (with xorg; [ - libX11 - libXxf86vm - libXext - libXinerama - libXrandr - ]); - - # Workaround for eoyilmaz/displaycal-py3#261 - setupPyGlobalFlags = [ "appdata" ]; - - doCheck = false; # Tests try to access an X11 session and dbus in weird locations. - - pythonImportsCheck = [ "DisplayCAL" ]; - - dontWrapGApps = true; - - preFixup = '' - makeWrapperArgs+=( - ''${gappsWrapperArgs[@]} - --prefix PATH : ${lib.makeBinPath [ argyllcms ]} - --prefix PYTHONPATH : $PYTHONPATH - ) - ''; - - meta = with lib; { - description = "Display calibration and characterization powered by Argyll CMS (Migrated to Python 3)"; - homepage = "https://github.com/eoyilmaz/displaycal-py3"; - license = licenses.gpl3Plus; - platforms = platforms.linux; - maintainers = with maintainers; [ toastal ]; - }; -} diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix index 20f061c50e04..b9c56a01e006 100644 --- a/pkgs/applications/graphics/drawio/default.nix +++ b/pkgs/applications/graphics/drawio/default.nix @@ -6,6 +6,7 @@ , copyDesktopItems , prefetch-yarn-deps , makeWrapper +, autoSignDarwinBinariesHook , nodejs , yarn , electron @@ -23,6 +24,11 @@ stdenv.mkDerivation rec { hash = "sha256-+TCnVXcmAEpa7MiL0dyeoh2aUfIIO8eze9pEaHgKnME="; }; + # `@electron/fuses` tries to run `codesign` and fails. Disable and use autoSignDarwinBinariesHook instead + postPatch = '' + sed -i -e 's/resetAdHocDarwinSignature:.*/resetAdHocDarwinSignature: false,/' build/fuses.js + ''; + offlineCache = fetchYarnDeps { yarnLock = src + "/yarn.lock"; hash = "sha256-QS0bkDDQq3sn79TQ+pTZsmbmXgMccyLmlPLTsko7eGg="; @@ -35,6 +41,8 @@ stdenv.mkDerivation rec { yarn ] ++ lib.optionals (!stdenv.isDarwin) [ copyDesktopItems + ] ++ lib.optionals stdenv.isDarwin [ + autoSignDarwinBinariesHook ]; ELECTRON_SKIP_BINARY_DOWNLOAD = true; diff --git a/pkgs/applications/graphics/opentoonz/default.nix b/pkgs/applications/graphics/opentoonz/default.nix index 1214d868d5c8..1dd460c2e1d2 100644 --- a/pkgs/applications/graphics/opentoonz/default.nix +++ b/pkgs/applications/graphics/opentoonz/default.nix @@ -1,12 +1,93 @@ -{ boost, cmake, fetchFromGitHub, freeglut, freetype, glew, libjpeg, libmypaint -, libpng, libtiff, libusb1, lz4, xz, lzo, openblas, opencv, pkg-config, qtbase -, qtmultimedia, qtscript, qtserialport, lib, stdenv, superlu, wrapQtAppsHook, }: -let source = import ./source.nix { inherit fetchFromGitHub; }; -in stdenv.mkDerivation rec { - inherit (source) src; +{ boost +, cmake +, fetchFromGitHub +, freeglut +, freetype +, glew +, libjpeg +, libmypaint +, libpng +, libusb1 +, lz4 +, xz +, lzo +, openblas +, opencv +, pkg-config +, qtbase +, qtmultimedia +, qtscript +, qtserialport +, lib +, stdenv +, superlu +, wrapQtAppsHook +, libtiff +, zlib +}: +let + libtiff-ver = "4.0.3"; # The version in thirdparty/tiff-* + opentoonz-ver = "1.7.1"; + + src = fetchFromGitHub { + owner = "opentoonz"; + repo = "opentoonz"; + rev = "v${opentoonz-ver}"; + hash = "sha256-5iXOvh4QTv+G0fjEHU62u7QCee+jbvKhK0+fQXbdJis="; + }; + + opentoonz-opencv = opencv.override { + inherit libtiff; + }; + + opentoonz-libtiff = stdenv.mkDerivation { + pname = "libtiff"; + version = "${libtiff-ver}-opentoonz"; + + inherit src; + outputs = [ "bin" "dev" "out" "man" "doc" ]; + + nativeBuildInputs = [ pkg-config ]; + propagatedBuildInputs = [ zlib libjpeg xz ]; + + postUnpack = '' + sourceRoot="$sourceRoot/thirdparty/tiff-${libtiff-ver}" + ''; + + # opentoonz uses internal libtiff headers + postInstall = '' + cp libtiff/{tif_config,tif_dir,tiffiop}.h $dev/include + ''; + + meta = libtiff.meta // { + knownVulnerabilities = [ + '' + Do not open untrusted files with Opentoonz: + Opentoonz uses an old custom fork of tibtiff from 2012 that is known to + be affected by at least these 50 vulnerabilities: + CVE-2012-4564 CVE-2013-4232 CVE-2013-4243 CVE-2013-4244 CVE-2014-8127 + CVE-2014-8128 CVE-2014-8129 CVE-2014-8130 CVE-2014-9330 CVE-2015-1547 + CVE-2015-8781 CVE-2015-8782 CVE-2015-8783 CVE-2015-8784 CVE-2015-8870 + CVE-2016-3620 CVE-2016-3621 CVE-2016-3623 CVE-2016-3624 CVE-2016-3625 + CVE-2016-3631 CVE-2016-3632 CVE-2016-3633 CVE-2016-3634 CVE-2016-3658 + CVE-2016-3945 CVE-2016-3990 CVE-2016-3991 CVE-2016-5102 CVE-2016-5314 + CVE-2016-5315 CVE-2016-5316 CVE-2016-5318 CVE-2016-5319 CVE-2016-5321 + CVE-2016-5322 CVE-2016-5323 CVE-2016-6223 CVE-2016-9453 CVE-2016-9532 + CVE-2017-9935 CVE-2017-9937 CVE-2018-10963 CVE-2018-5360 + CVE-2019-14973 CVE-2019-17546 CVE-2020-35521 CVE-2020-35522 + CVE-2020-35523 CVE-2020-35524 + More info at https://github.com/opentoonz/opentoonz/issues/4193 + '' + ]; + maintainers = with lib.maintainers; [ chkno ]; + }; + }; +in +stdenv.mkDerivation { + inherit src; pname = "opentoonz"; - version = source.versions.opentoonz; + version = opentoonz-ver; nativeBuildInputs = [ cmake pkg-config wrapQtAppsHook ]; @@ -18,13 +99,13 @@ in stdenv.mkDerivation rec { libjpeg libmypaint libpng - libtiff + opentoonz-libtiff libusb1 lz4 xz lzo openblas - opencv + opentoonz-opencv qtbase qtmultimedia qtscript @@ -37,8 +118,9 @@ in stdenv.mkDerivation rec { cmakeDir = "../sources"; cmakeFlags = [ "-DCMAKE_SKIP_BUILD_RPATH=ON" - "-DTIFF_INCLUDE_DIR=${libtiff.dev}/include" - "-DTIFF_LIBRARY=${libtiff.out}/lib/libtiff.so" + "-DTIFF_INCLUDE_DIR=${opentoonz-libtiff.dev}/include" + "-DTIFF_LIBRARY=${opentoonz-libtiff.out}/lib/libtiff.so" + (lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" true) ]; postInstall = '' diff --git a/pkgs/applications/graphics/opentoonz/libtiff.nix b/pkgs/applications/graphics/opentoonz/libtiff.nix deleted file mode 100644 index 43ba1592ccc2..000000000000 --- a/pkgs/applications/graphics/opentoonz/libtiff.nix +++ /dev/null @@ -1,56 +0,0 @@ -# Per https://github.com/opentoonz/opentoonz/blob/master/doc/how_to_build_linux.md , -# opentoonz requires its own modified version of libtiff. We still build it as -# a separate package -# 1. For visibility for tools like vulnix, and -# 2. To avoid a diamond-dependency problem with opencv linking the normal libtiff -# and opentoonz linking opencv and this modified libtiff, we build an opencv -# against this modified libtiff as well. -# -# We use a separate mkDerivation rather than a minimal libtiff.overrideAttrs -# because the main libtiff builds with cmake and this version of libtiff was -# forked before libtiff gained CMake build capability (added in libtiff-4.0.5). - -{ lib, fetchFromGitHub, stdenv, pkg-config, zlib, libjpeg, xz, libtiff, }: - -let source = import ./source.nix { inherit fetchFromGitHub; }; - -in stdenv.mkDerivation { - pname = "libtiff"; - version = source.versions.libtiff + "-opentoonz"; - - inherit (source) src; - outputs = [ "bin" "dev" "out" "man" "doc" ]; - - nativeBuildInputs = [ pkg-config ]; - propagatedBuildInputs = [ zlib libjpeg xz ]; - - postUnpack = '' - sourceRoot="$sourceRoot/thirdparty/tiff-${source.versions.libtiff}" - ''; - - # opentoonz uses internal libtiff headers - postInstall = '' - cp libtiff/{tif_config,tif_dir,tiffiop}.h $dev/include - ''; - - meta = libtiff.meta // { - knownVulnerabilities = ['' - Do not open untrusted files with Opentoonz: - Opentoonz uses an old custom fork of tibtiff from 2012 that is known to - be affected by at least these 50 vulnerabilities: - CVE-2012-4564 CVE-2013-4232 CVE-2013-4243 CVE-2013-4244 CVE-2014-8127 - CVE-2014-8128 CVE-2014-8129 CVE-2014-8130 CVE-2014-9330 CVE-2015-1547 - CVE-2015-8781 CVE-2015-8782 CVE-2015-8783 CVE-2015-8784 CVE-2015-8870 - CVE-2016-3620 CVE-2016-3621 CVE-2016-3623 CVE-2016-3624 CVE-2016-3625 - CVE-2016-3631 CVE-2016-3632 CVE-2016-3633 CVE-2016-3634 CVE-2016-3658 - CVE-2016-3945 CVE-2016-3990 CVE-2016-3991 CVE-2016-5102 CVE-2016-5314 - CVE-2016-5315 CVE-2016-5316 CVE-2016-5318 CVE-2016-5319 CVE-2016-5321 - CVE-2016-5322 CVE-2016-5323 CVE-2016-6223 CVE-2016-9453 CVE-2016-9532 - CVE-2017-9935 CVE-2017-9937 CVE-2018-10963 CVE-2018-5360 - CVE-2019-14973 CVE-2019-17546 CVE-2020-35521 CVE-2020-35522 - CVE-2020-35523 CVE-2020-35524 - More info at https://github.com/opentoonz/opentoonz/issues/4193 - '']; - maintainers = with lib.maintainers; [ chkno ]; - }; -} diff --git a/pkgs/applications/graphics/opentoonz/source.nix b/pkgs/applications/graphics/opentoonz/source.nix deleted file mode 100644 index 2864dcf36088..000000000000 --- a/pkgs/applications/graphics/opentoonz/source.nix +++ /dev/null @@ -1,16 +0,0 @@ -# opentoonz's source archive contains both opentoonz's source and a modified -# version of libtiff that opentoonz requires. - -{ fetchFromGitHub, }: rec { - versions = { - opentoonz = "1.7.1"; - libtiff = "4.0.3"; # The version in thirdparty/tiff-* - }; - - src = fetchFromGitHub { - owner = "opentoonz"; - repo = "opentoonz"; - rev = "v${versions.opentoonz}"; - hash = "sha256-5iXOvh4QTv+G0fjEHU62u7QCee+jbvKhK0+fQXbdJis="; - }; -} diff --git a/pkgs/applications/graphics/pikopixel/default.nix b/pkgs/applications/graphics/pikopixel/default.nix index 586870527508..c65353143368 100644 --- a/pkgs/applications/graphics/pikopixel/default.nix +++ b/pkgs/applications/graphics/pikopixel/default.nix @@ -42,7 +42,7 @@ clangStdenv.mkDerivation rec { mainProgram = "PikoPixel"; homepage = "https://twilightedge.com/mac/pikopixel/"; downloadPage = "https://twilightedge.com/mac/pikopixel/"; - license = licenses.agpl3; + license = licenses.agpl3Plus; maintainers = with maintainers; [ fgaz ]; platforms = platforms.all; }; diff --git a/pkgs/applications/graphics/structorizer/default.nix b/pkgs/applications/graphics/structorizer/default.nix index 5c504777ecc2..6bf2cf24d80e 100644 --- a/pkgs/applications/graphics/structorizer/default.nix +++ b/pkgs/applications/graphics/structorizer/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { pname = "structorizer"; - version = "3.32-17"; + version = "3.32-18"; desktopItems = [ (makeDesktopItem { @@ -38,7 +38,7 @@ stdenv.mkDerivation rec { owner = "fesch"; repo = "Structorizer.Desktop"; rev = version; - hash = "sha256-yJPF4N402wzc4kNWgcu7quhQ9QaERMfqHdQrf1IGwrQ="; + hash = "sha256-CA87j11TFUd0nmuPc1qyqdITkTPE/jauf31cO2iBQVg="; }; patches = [ ./makeStructorizer.patch ./makeBigJar.patch ]; |