uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
103
pkgs/applications/graphics/drawio/default.nix
Normal file
103
pkgs/applications/graphics/drawio/default.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{ stdenv, lib, fetchurl, rpmextract, autoPatchelfHook, wrapGAppsHook
|
||||
|
||||
# Dynamic libraries
|
||||
, alsa-lib, 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, libxshmfence, nspr, nss, pango, mesa
|
||||
|
||||
, systemd
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "drawio";
|
||||
version = "19.0.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/drawio-x86_64-${version}.rpm";
|
||||
sha256 = "46b4e7269628100ea3c083dee75308d9746780e46eac15d2c5495fdeece7e323";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
rpmextract
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
alsa-lib
|
||||
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
|
||||
libxshmfence
|
||||
libXtst
|
||||
libxcb
|
||||
libuuid
|
||||
mesa # for libgbm
|
||||
nspr
|
||||
nss
|
||||
pango
|
||||
systemd
|
||||
];
|
||||
|
||||
runtimeDependencies = [
|
||||
(lib.getLib systemd)
|
||||
];
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
||||
unpackPhase = "rpmextract ${src}";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share
|
||||
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
|
||||
ln -s $out/share/drawio/drawio $out/bin/drawio
|
||||
|
||||
# Update binary path
|
||||
substituteInPlace $out/share/applications/drawio.desktop \
|
||||
--replace /opt/drawio/drawio $out/bin/drawio
|
||||
'';
|
||||
|
||||
doInstallCheckPhase = true;
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/drawio --help > /dev/null
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A desktop application for creating diagrams";
|
||||
homepage = "https://about.draw.io/";
|
||||
license = licenses.asl20;
|
||||
changelog = "https://github.com/jgraph/drawio-desktop/releases/tag/v${version}";
|
||||
maintainers = with maintainers; [ darkonion0 ];
|
||||
platforms = [ "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
36
pkgs/applications/graphics/drawio/headless.nix
Normal file
36
pkgs/applications/graphics/drawio/headless.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, writeTextFile, runtimeShell, drawio, xvfb-run }:
|
||||
|
||||
writeTextFile {
|
||||
name = "${drawio.pname}-headless-${drawio.version}";
|
||||
|
||||
executable = true;
|
||||
destination = "/bin/drawio";
|
||||
text = ''
|
||||
#!${runtimeShell}
|
||||
|
||||
# Electron really wants a configuration directory to not die with:
|
||||
# "Error: Failed to get 'appData' path"
|
||||
# so we give it some temp dir as XDG_CONFIG_HOME
|
||||
tmpdir=$(mktemp -d)
|
||||
|
||||
function cleanup {
|
||||
rm -rf "$tmpdir"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
# Drawio needs to run in a virtual X session, because Electron
|
||||
# refuses to work and dies with an unhelpful error message otherwise:
|
||||
# "The futex facility returned an unexpected error code."
|
||||
XDG_CONFIG_HOME="$tmpdir" ${xvfb-run}/bin/xvfb-run ${drawio}/bin/drawio $@
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "xvfb wrapper around drawio";
|
||||
longDescription = ''
|
||||
A wrapper around drawio for running in headless environments.
|
||||
Runs drawio under xvfb-run, with configuration going to a temporary
|
||||
directory.
|
||||
'';
|
||||
maintainers = with maintainers; [ qyliss tfc ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue