diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2019-07-09 15:46:00 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2019-07-09 15:46:00 +0200 |
commit | 74c24385cb2864f937031df74af14fc8060e1540 (patch) | |
tree | 5524856cfa11a449f4bef972fbc994bec6ff44cf /pkgs/applications/graphics | |
parent | 5c8472a2a17625855d0811ebb5709c9aa84fdd3f (diff) | |
parent | f0e38f7b3810b0f06bbe6908158fcb247d0e2dd3 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/graphics')
3 files changed, 139 insertions, 2 deletions
diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix new file mode 100644 index 0000000000000..70cf1c149ab1d --- /dev/null +++ b/pkgs/applications/graphics/drawio/default.nix @@ -0,0 +1,94 @@ +{ stdenv, lib, fetchurl, rpmextract, autoPatchelfHook, wrapGAppsHook + +# Dynamic libraries +, alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, dbus, cups, expat +, gdk_pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor +, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst +, libxcb, libuuid, nspr, nss, pango + +, systemd +}: + +stdenv.mkDerivation rec { + pname = "drawio"; + version = "10.8.0"; + + src = fetchurl { + url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm"; + sha256 = "0c5wymzhbp72x0yhvw7vb4akkdvj97npl9kglk79vqjbzfn5di9k"; + }; + + nativeBuildInputs = [ + autoPatchelfHook + rpmextract + wrapGAppsHook + ]; + + buildInputs = [ + alsaLib + atk + at-spi2-atk + at-spi2-core + cairo + cups + dbus + expat + gdk_pixbuf + glib + gtk3 + libX11 + libXScrnSaver + libXcomposite + libXcursor + libXdamage + libXext + libXfixes + libXi + libXrandr + libXrender + libXtst + libxcb + libuuid + nspr + nss + pango + systemd + ]; + + runtimeDependencies = [ + systemd.lib + ]; + + dontBuild = true; + dontConfigure = true; + + unpackPhase = "rpmextract ${src}"; + + installPhase = '' + mkdir -p $out/share + cp -r opt/draw.io $out/share/ + + # Application icon + mkdir -p $out/share/icons/hicolor + cp -r usr/share/icons/hicolor/0x0 $out/share/icons/hicolor/1024x1024 + + # XDG desktop item + cp -r usr/share/applications $out/share/applications + + # Symlink wrapper + mkdir -p $out/bin + ln -s $out/share/draw.io/draw.io $out/bin/draw.io + + # Update binary path + substituteInPlace $out/share/applications/draw.io.desktop \ + --replace /opt/draw.io/draw.io $out/bin/draw.io + ''; + + meta = with stdenv.lib; { + description = "A desktop application for creating diagrams"; + homepage = https://about.draw.io/; + license = licenses.asl20; + maintainers = with maintainers; [ danieldk ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/applications/graphics/graphicsmagick/1.3.32-darwin-png-strlcat-fix.patch b/pkgs/applications/graphics/graphicsmagick/1.3.32-darwin-png-strlcat-fix.patch new file mode 100644 index 0000000000000..91eacecbf8c66 --- /dev/null +++ b/pkgs/applications/graphics/graphicsmagick/1.3.32-darwin-png-strlcat-fix.patch @@ -0,0 +1,42 @@ +# reduced version of commit f30492f40f78d867b43422215057dd21de4ba447 +# from upstream hg repository: +RegisterPNGImage(): Pass correct size value to strlcat(). + +diff -r 95c4711e8bee -r f30492f40f78 coders/png.c +--- a/coders/png.c Mon Jun 17 07:24:30 2019 -0500 ++++ b/coders/png.c Mon Jun 17 18:54:43 2019 -0500 +@@ -6427,26 +6427,26 @@ + + *version='\0'; + #if defined(PNG_LIBPNG_VER_STRING) +- (void) strlcat(version,"libpng ",MaxTextExtent); +- (void) strlcat(version,PNG_LIBPNG_VER_STRING,MaxTextExtent); ++ (void) strlcat(version,"libpng ",sizeof(version)); ++ (void) strlcat(version,PNG_LIBPNG_VER_STRING,sizeof(version)); + #if (PNG_LIBPNG_VER > 10005) + if (LocaleCompare(PNG_LIBPNG_VER_STRING,png_get_header_ver(NULL)) != 0) + { +- (void) strlcat(version,",",MaxTextExtent); +- (void) strlcat(version,png_get_libpng_ver(NULL),MaxTextExtent); ++ (void) strlcat(version,",",sizeof(version)); ++ (void) strlcat(version,png_get_libpng_ver(NULL),sizeof(version)); + } + #endif + #endif + + #if defined(ZLIB_VERSION) + if (*version != '\0') +- (void) strlcat(version,", ",MaxTextExtent); +- (void) strlcat(version,"zlib ",MaxTextExtent); +- (void) strlcat(version,ZLIB_VERSION,MaxTextExtent); ++ (void) strlcat(version,", ",sizeof(version)); ++ (void) strlcat(version,"zlib ",sizeof(version)); ++ (void) strlcat(version,ZLIB_VERSION,sizeof(version)); + if (LocaleCompare(ZLIB_VERSION,zlib_version) != 0) + { +- (void) strlcat(version,",",MaxTextExtent); +- (void) strlcat(version,zlib_version,MaxTextExtent); ++ (void) strlcat(version,",",sizeof(version)); ++ (void) strlcat(version,zlib_version,sizeof(version)); + } + #endif diff --git a/pkgs/applications/graphics/graphicsmagick/default.nix b/pkgs/applications/graphics/graphicsmagick/default.nix index c93b4fe958d5b..84d1450da823f 100644 --- a/pkgs/applications/graphics/graphicsmagick/default.nix +++ b/pkgs/applications/graphics/graphicsmagick/default.nix @@ -4,15 +4,16 @@ stdenv.mkDerivation rec { name = "graphicsmagick-${version}"; - version = "1.3.31"; + version = "1.3.32"; src = fetchurl { url = "mirror://sourceforge/graphicsmagick/GraphicsMagick-${version}.tar.xz"; - sha256 = "0y22740f25qxsqqqg26xqlfp920dm57b7hrgaqmx7azksrcvnsq9"; + sha256 = "1qclp9i31idpcbbqswmnq2q11lmv0a7cvdb1y72xcky8sshaahmq"; }; patches = [ ./disable-popen.patch + ./1.3.32-darwin-png-strlcat-fix.patch ]; configureFlags = [ |