general high-level discussion about spectrum
 help / color / mirror / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: Ville Ilvonen <ville.ilvonen@unikie.com>
Cc: Paco <paco@ecomail.io>, discuss@spectrum-os.org
Subject: Re: Documentation and diagrams
Date: Wed, 18 May 2022 13:11:37 +0000	[thread overview]
Message-ID: <20220518131137.sv7qvdy6cllwszu7@eve> (raw)
In-Reply-To: <20220518125353.cw4faxgab22r2jr5@eve>

[-- Attachment #1: Type: text/plain, Size: 2817 bytes --]

On Wed, May 18, 2022 at 12:53:53PM +0000, Alyssa Ross wrote:
> On Wed, May 18, 2022 at 03:44:45PM +0300, Ville Ilvonen wrote:
> > On Tue, May 17, 2022 at 10:00 PM Paco <paco@ecomail.io> wrote:
> > >
> > > Hi all,
> > >
> > >  > One question about draw.io: is there a tool we could use in the build
> > >  > process of our documentation to render the .drawio files to SVG, so we
> > >  > don't have to check in the SVG files?
> > >
> > > drawio supports being called on the command-line like this:
> > >
> > > drawio in.drawio --export --output out.png # or svg
> >
> > Yes, and no. Yes, command line but no in a headless environment.
> > It was easy to test this before "jekyll build" with "drawio in.drawio
> > --export --output test.svg"
> >
> > However,
> >
> > [vilvo@blop:~/dev/spectrum/Documentation]$ nix-build -I
> > nixpkgs=../../nixpkgs-spectrum
> > ...
> > error: builder for
> > '/nix/store/r8xf2kpba673ngi2fck4xsyvyc6pd3j1-spectrum-docs.drv' failed
> > with exit code 133;
> >        last 10 log lines:
> >        >     at new ElectronStore
> > (/nix/store/iqinmbk2jzl8nay42hqkbd32mbj1jzq7-drawio-18.0.6/share/drawio/resources/app.asar/node_modules/electron-store/index.js:48:32)
> >        >     at Object.<anonymous>
> > (/nix/store/iqinmbk2jzl8nay42hqkbd32mbj1jzq7-drawio-18.0.6/share/drawio/resources/app.asar/electron.js:15:15)
> >        >     at Module._compile (node:internal/modules/cjs/loader:1116:14)
> >        >     at Object.Module._extensions..js
> > (node:internal/modules/cjs/loader:1169:10)
> >        >     at Module.load (node:internal/modules/cjs/loader:988:32)
> >        >     at Module._load (node:internal/modules/cjs/loader:829:12)
> >        >     at Function.c._load (node:electron/js2c/asar_bundle:5:13343)
> >        >     at Object.<anonymous> (node:electron/js2c/browser_init:185:3104)
> >        >     at Object../lib/browser/init.ts
> > (node:electron/js2c/browser_init:185:3308)
> >        > /build/.attr-0l2nkwhif96f51f4amnlf414lhl4rv9vh8iffyp431v6s28gsr90:
> > line 1:     5 Trace/breakpoint trap   (core dumped) drawio in.drawio
> > --export --output test.svg
> >
> > Issue is the same with drawio versions:
> > - version 15.7.3 from nixpkgs
> > - version 17.4.2 from nixpkgs-spectrum
> > - latest rpm available - 18.0.6 from updated nixpkgs-spectrum
>
> Does it maybe require an X server / Wayland compositor to talk to?  That
> would be a pain to do in the build but maybe not impossible.  I know
> there are programs for dummy compositors out there but don't know how
> easy they are to use.

Actually, this looking more closely at the stack trace, this is more
likely to be it not having a writeable XDG_CONFIG_HOME or HOME
directory.  So you could try setting those to temporary directories in
the build.  Something like

	export XDG_CONFIG_HOME="$(mktemp -d)"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-05-18 13:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-17  5:52 Documentation and diagrams ville.ilvonen
2022-05-17 11:42 ` Mark Stosberg
2022-05-17 12:25 ` Alyssa Ross
2022-05-17 19:00   ` Paco
2022-05-18 12:44     ` Ville Ilvonen
2022-05-18 12:53       ` Alyssa Ross
2022-05-18 13:11         ` Alyssa Ross [this message]
2022-05-19  7:25           ` Ville Ilvonen
2022-05-19  7:35             ` Alyssa Ross
2022-05-19  8:33               ` Ville Ilvonen
2022-05-19  8:49                 ` Alyssa Ross
2022-05-18 13:09       ` Michael Raskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220518131137.sv7qvdy6cllwszu7@eve \
    --to=hi@alyssa.is \
    --cc=discuss@spectrum-os.org \
    --cc=paco@ecomail.io \
    --cc=ville.ilvonen@unikie.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).