2019-07-02 08:38:54 +02:00
|
|
|
{ stdenv, lib, fetchurl, rpmextract, autoPatchelfHook, wrapGAppsHook
|
|
|
|
|
|
|
|
# Dynamic libraries
|
2021-06-10 04:57:09 +02:00
|
|
|
, alsa-lib, atk, at-spi2-atk, at-spi2-core, cairo, dbus, cups, expat
|
2019-05-22 13:03:39 +02:00
|
|
|
, gdk-pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor
|
2019-07-02 08:38:54 +02:00
|
|
|
, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst
|
2021-04-09 10:41:26 +02:00
|
|
|
, libxcb, libuuid, libxshmfence, nspr, nss, pango, mesa
|
2019-07-02 08:38:54 +02:00
|
|
|
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "drawio";
|
2021-03-31 20:58:15 +02:00
|
|
|
version = "14.5.1";
|
2019-07-02 08:38:54 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-03-31 20:58:15 +02:00
|
|
|
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/drawio-x86_64-${version}.rpm";
|
|
|
|
hash = "sha256-ZrEoeeEhHQOLm/L3KA43Ru5fruIPK35CCUsllwpPB58=";
|
2019-07-02 08:38:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoPatchelfHook
|
|
|
|
rpmextract
|
|
|
|
wrapGAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2021-06-10 04:57:09 +02:00
|
|
|
alsa-lib
|
2019-07-02 08:38:54 +02:00
|
|
|
atk
|
|
|
|
at-spi2-atk
|
|
|
|
at-spi2-core
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
dbus
|
|
|
|
expat
|
2019-05-22 13:03:39 +02:00
|
|
|
gdk-pixbuf
|
2019-07-02 08:38:54 +02:00
|
|
|
glib
|
|
|
|
gtk3
|
|
|
|
libX11
|
|
|
|
libXScrnSaver
|
|
|
|
libXcomposite
|
|
|
|
libXcursor
|
|
|
|
libXdamage
|
|
|
|
libXext
|
|
|
|
libXfixes
|
|
|
|
libXi
|
|
|
|
libXrandr
|
|
|
|
libXrender
|
2021-03-31 20:58:15 +02:00
|
|
|
libxshmfence
|
2019-07-02 08:38:54 +02:00
|
|
|
libXtst
|
|
|
|
libxcb
|
|
|
|
libuuid
|
2021-04-09 10:41:26 +02:00
|
|
|
mesa # for libgbm
|
2019-07-02 08:38:54 +02:00
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
pango
|
|
|
|
systemd
|
|
|
|
];
|
|
|
|
|
|
|
|
runtimeDependencies = [
|
2020-08-12 20:13:02 +02:00
|
|
|
(lib.getLib systemd)
|
2019-07-02 08:38:54 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
dontConfigure = true;
|
|
|
|
|
|
|
|
unpackPhase = "rpmextract ${src}";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share
|
2021-03-31 20:58:15 +02:00
|
|
|
cp -r opt/drawio $out/share/
|
2019-07-02 08:38:54 +02:00
|
|
|
|
|
|
|
# Application icon
|
|
|
|
mkdir -p $out/share/icons/hicolor
|
2019-08-16 08:31:31 +02:00
|
|
|
cp -r usr/share/icons/hicolor/* $out/share/icons/hicolor/
|
2019-07-02 08:38:54 +02:00
|
|
|
|
|
|
|
# XDG desktop item
|
|
|
|
cp -r usr/share/applications $out/share/applications
|
|
|
|
|
|
|
|
# Symlink wrapper
|
|
|
|
mkdir -p $out/bin
|
2021-03-31 20:58:15 +02:00
|
|
|
ln -s $out/share/drawio/drawio $out/bin/drawio
|
2019-07-02 08:38:54 +02:00
|
|
|
|
|
|
|
# Update binary path
|
2019-08-16 08:31:31 +02:00
|
|
|
substituteInPlace $out/share/applications/drawio.desktop \
|
2021-03-31 20:58:15 +02:00
|
|
|
--replace /opt/drawio/drawio $out/bin/drawio
|
2019-07-02 08:38:54 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2019-07-02 08:38:54 +02:00
|
|
|
description = "A desktop application for creating diagrams";
|
2020-03-29 04:18:40 +02:00
|
|
|
homepage = "https://about.draw.io/";
|
2019-07-02 08:38:54 +02:00
|
|
|
license = licenses.asl20;
|
2020-07-25 08:25:19 +02:00
|
|
|
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${version}";
|
2021-07-03 12:07:30 +02:00
|
|
|
maintainers = with maintainers; [ ];
|
2019-07-02 08:38:54 +02:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|