git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #64109 from danieldk/draw.io

drawio: init at 10.8.0

commit5dbce90a7e7d683bf878a635b76cec77c8e052cc authorworldofpeace <worldofpeace@protonmail.ch> dateTue 9 Jul 2019, 09:28 (7 years ago) parent6ebb662f658a3c
2 files changed+96
pkgs/applications/graphics/drawio/default.nix+94 pkgs/top-level/all-packages.nix+2
pkgs/applications/graphics/drawio/default.nixnew file+94
@@ -0,0 +1,94 @@
1+{ stdenv, lib, fetchurl, rpmextract, autoPatchelfHook, wrapGAppsHook
2+
3+# Dynamic libraries
4+, alsaLib, atk, at-spi2-atk, at-spi2-core, cairo, dbus, cups, expat
5+, gdk_pixbuf, glib, gtk3, libX11, libXScrnSaver, libXcomposite, libXcursor
6+, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender, libXtst
7+, libxcb, libuuid, nspr, nss, pango
8+
9+, systemd
10+}:
11+
12+stdenv.mkDerivation rec {
13+ pname = "drawio";
14+ version = "10.8.0";
15+
16+ src = fetchurl {
17+ url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
18+ sha256 = "0c5wymzhbp72x0yhvw7vb4akkdvj97npl9kglk79vqjbzfn5di9k";
19+ };
20+
21+ nativeBuildInputs = [
22+ autoPatchelfHook
23+ rpmextract
24+ wrapGAppsHook
25+ ];
26+
27+ buildInputs = [
28+ alsaLib
29+ atk
30+ at-spi2-atk
31+ at-spi2-core
32+ cairo
33+ cups
34+ dbus
35+ expat
36+ gdk_pixbuf
37+ glib
38+ gtk3
39+ libX11
40+ libXScrnSaver
41+ libXcomposite
42+ libXcursor
43+ libXdamage
44+ libXext
45+ libXfixes
46+ libXi
47+ libXrandr
48+ libXrender
49+ libXtst
50+ libxcb
51+ libuuid
52+ nspr
53+ nss
54+ pango
55+ systemd
56+ ];
57+
58+ runtimeDependencies = [
59+ systemd.lib
60+ ];
61+
62+ dontBuild = true;
63+ dontConfigure = true;
64+
65+ unpackPhase = "rpmextract ${src}";
66+
67+ installPhase = ''
68+ mkdir -p $out/share
69+ cp -r opt/draw.io $out/share/
70+
71+ # Application icon
72+ mkdir -p $out/share/icons/hicolor
73+ cp -r usr/share/icons/hicolor/0x0 $out/share/icons/hicolor/1024x1024
74+
75+ # XDG desktop item
76+ cp -r usr/share/applications $out/share/applications
77+
78+ # Symlink wrapper
79+ mkdir -p $out/bin
80+ ln -s $out/share/draw.io/draw.io $out/bin/draw.io
81+
82+ # Update binary path
83+ substituteInPlace $out/share/applications/draw.io.desktop \
84+ --replace /opt/draw.io/draw.io $out/bin/draw.io
85+ '';
86+
87+ meta = with stdenv.lib; {
88+ description = "A desktop application for creating diagrams";
89+ homepage = https://about.draw.io/;
90+ license = licenses.asl20;
91+ maintainers = with maintainers; [ danieldk ];
92+ platforms = [ "x86_64-linux" ];
93+ };
94+}
pkgs/top-level/all-packages.nix+2
@@ -17431,6 +17431,8 @@ in
1743117431
1743217432 dragonfly-reverb = callPackage ../applications/audio/dragonfly-reverb { };
1743317433
17434+ drawio = callPackage ../applications/graphics/drawio {};
17435+
1743417436 drawpile = libsForQt5.callPackage ../applications/graphics/drawpile { };
1743517437 drawpile-server-headless = libsForQt5.callPackage ../applications/graphics/drawpile {
1743617438 buildClient = false;