mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
9b8d88cb78
Upstream changelog: * Updates to draw.io 12.3.2, changes from, and including, 12.2.3 to 12.3.2 are new in this desktop release. * Updates to Electron 7.1.2. * Fixes issue where all zeros are written to file.
95 lines
1.9 KiB
Nix
95 lines
1.9 KiB
Nix
{ 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 = "12.3.2";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
|
|
sha256 = "1hh4616dbq0fqldlph7vyl8vkibwc3xpcv9r1m2v949kn84yi2j3";
|
|
};
|
|
|
|
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/* $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
|
|
'';
|
|
|
|
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" ];
|
|
};
|
|
}
|