diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2019-07-09 09:28:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-09 09:28:27 -0400 |
commit | 5dbce90a7e7d683bf878a635b76cec77c8e052cc (patch) | |
tree | 2a8d0f24c5899244c6ae8c0d14b13d3450f831f6 /pkgs/applications | |
parent | 6ebb66226825babf0c38449926cb39c9569dbe59 (diff) | |
parent | f658a3c80754634dca8293ab229ea7323bf61ffd (diff) | |
download | nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar.gz nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar.bz2 nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar.lz nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar.xz nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.tar.zst nixlib-5dbce90a7e7d683bf878a635b76cec77c8e052cc.zip |
Merge pull request #64109 from danieldk/draw.io
drawio: init at 10.8.0
Diffstat (limited to 'pkgs/applications')
-rw-r--r-- | pkgs/applications/graphics/drawio/default.nix | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/pkgs/applications/graphics/drawio/default.nix b/pkgs/applications/graphics/drawio/default.nix new file mode 100644 index 000000000000..70cf1c149ab1 --- /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" ]; + }; +} |