2020-04-24 23:36:52 +00:00
|
|
|
{ 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";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "14.4.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
2021-03-09 03:18:52 +00:00
|
|
|
hash = "sha256-0wBjZg6IvjVTzAGeXTBBZjIN6s9NxKV0r76YK9h4fFk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 = [
|
2020-09-25 04:45:31 +00:00
|
|
|
(lib.getLib systemd)
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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/* $out/share/icons/hicolor/
|
|
|
|
|
|
|
|
# XDG desktop item
|
|
|
|
cp -r usr/share/applications $out/share/applications
|
|
|
|
|
|
|
|
# Symlink wrapper
|
|
|
|
mkdir -p $out/bin
|
|
|
|
ln -s $out/share/draw.io/drawio $out/bin/drawio
|
|
|
|
|
|
|
|
# Update binary path
|
|
|
|
substituteInPlace $out/share/applications/drawio.desktop \
|
|
|
|
--replace /opt/draw.io/drawio $out/bin/drawio
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A desktop application for creating diagrams";
|
|
|
|
homepage = "https://about.draw.io/";
|
|
|
|
license = licenses.asl20;
|
2020-08-20 17:08:02 +00:00
|
|
|
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ danieldk ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|