3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/graphics/drawio/default.nix

97 lines
2.1 KiB
Nix
Raw Normal View History

{ 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
, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst
2021-03-31 19:58:15 +01:00
, libxcb, libuuid, libxshmfence, nspr, nss, pango
, systemd
}:
stdenv.mkDerivation rec {
pname = "drawio";
2021-03-31 19:58:15 +01:00
version = "14.5.1";
src = fetchurl {
2021-03-31 19:58:15 +01:00
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/drawio-x86_64-${version}.rpm";
hash = "sha256-ZrEoeeEhHQOLm/L3KA43Ru5fruIPK35CCUsllwpPB58=";
};
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
glib
gtk3
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
2021-03-31 19:58:15 +01:00
libxshmfence
libXtst
libxcb
libuuid
nspr
nss
pango
systemd
];
runtimeDependencies = [
(lib.getLib systemd)
];
dontBuild = true;
dontConfigure = true;
unpackPhase = "rpmextract ${src}";
installPhase = ''
mkdir -p $out/share
2021-03-31 19:58:15 +01:00
cp -r opt/drawio $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
2021-03-31 19:58:15 +01:00
ln -s $out/share/drawio/drawio $out/bin/drawio
# Update binary path
substituteInPlace $out/share/applications/drawio.desktop \
2021-03-31 19:58:15 +01:00
--replace /opt/drawio/drawio $out/bin/drawio
'';
meta = with lib; {
description = "A desktop application for creating diagrams";
2020-03-29 03:18:40 +01:00
homepage = "https://about.draw.io/";
license = licenses.asl20;
2020-07-25 07:25:19 +01:00
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${version}";
maintainers = with maintainers; [ danieldk ];
platforms = [ "x86_64-linux" ];
};
}