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
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