2019-07-02 07:38:54 +01:00
|
|
|
{ stdenv, lib, fetchurl, rpmextract, autoPatchelfHook, wrapGAppsHook
|
|
|
|
|
|
|
|
# Dynamic libraries
|
|
|
|
, alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, dbus, cups, expat
|
2019-05-22 12:03:39 +01:00
|
|
|
, gdk-pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor
|
2019-07-02 07:38:54 +01:00
|
|
|
, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst
|
|
|
|
, libxcb, libuuid, nspr, nss, pango
|
|
|
|
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "drawio";
|
2019-11-09 07:34:37 +00:00
|
|
|
version = "12.2.2";
|
2019-07-02 07:38:54 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
2019-11-09 07:34:37 +00:00
|
|
|
sha256 = "04h11gdy78py9zrs3v6y0hhhc2n1h4s0ymbvf6qn4vv4r3r9vbaw";
|
2019-07-02 07:38:54 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
rpmextract
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2019-07-02 07:38:54 +01:00
|
|
|
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
|
2019-08-16 07:31:31 +01:00
|
|
|
cp -r usr/share/icons/hicolor/* $out/share/icons/hicolor/
|
2019-07-02 07:38:54 +01:00
|
|
|
|
|
|
|
# XDG desktop item
|
|
|
|
cp -r usr/share/applications $out/share/applications
|
|
|
|
|
|
|
|
# Symlink wrapper
|
|
|
|
mkdir -p $out/bin
|
2019-08-16 07:31:31 +01:00
|
|
|
ln -s $out/share/draw.io/drawio $out/bin/drawio
|
2019-07-02 07:38:54 +01:00
|
|
|
|
|
|
|
# Update binary path
|
2019-08-16 07:31:31 +01:00
|
|
|
substituteInPlace $out/share/applications/drawio.desktop \
|
|
|
|
--replace /opt/draw.io/drawio $out/bin/drawio
|
2019-07-02 07:38:54 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
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" ];
|
|
|
|
};
|
|
|
|
}
|