!NhAsaYbbgmzHtXTPQJ:funklause.de

Nix NodeJS

149 Members
47 Servers

Load older messages


SenderMessageTime
17 Jul 2024
@c0ba1t:matrix.orgCobaltTo build the electron app, you require a compiled version of the frontend.21:48:54
@c0ba1t:matrix.orgCobalt And the compiled frontend + docs needs to be copied into the electron source in copy:assets. 21:51:33
@wst:imagisphe.rewstYep, that's what I'm trying to do. 21:56:41
@c0ba1t:matrix.orgCobalt

So my first guess would be to

  1. build the frontend and then
  2. build the electron app
    in separate derivations. For 2. you would have to replicate the logic from copy:assets in the preBuild/ patchPhase phase using the compiled output from 1.
21:53:49
@wst:imagisphe.rewstI wonder if the "frontend" can just be wrapped with electron by some nixpkgs function. As far as I understand electron just renders the frontend, so I don't have to build electron from their repo22:01:47
@c0ba1t:matrix.orgCobalt *

So my first guess would be to

  1. build the frontend and then
  2. build the electron app

in separate derivations. For 2. you would have to replicate the logic from copy:assets in the preBuild/ patchPhase phase using the compiled output from 1.

21:54:17
@wst:imagisphe.rewstBut I'm getting ahead of myself22:01:55
@wst:imagisphe.rewstI see22:03:44
@wst:imagisphe.rewst So the frontend part lives in joi as far as I understood 22:05:06
@c0ba1t:matrix.orgCobaltI'm not too sure about that. You would likely lose some functionlaity. Their electron app is a bit more than a simple wrapper and also, e.g., offers tray support and appears to be doing some fancy stuff to make it appear more native-sh.22:05:05
@wst:imagisphe.rewstTo build it I would need to run first pull the dependencies in advance, since there's no network while building derivation22:06:20
@c0ba1t:matrix.orgCobaltRedacted or Malformed Event22:05:20
@c0ba1t:matrix.orgCobalt
In reply to @wst:imagisphe.re
So the frontend part lives in joi as far as I understood
I think that's just their UI kit. The build job in the Makefile only directly calls out to build web and afterwards electron.
22:10:29
@c0ba1t:matrix.orgCobalt You will probably first want to try to get a derivation with the equivalent of build:web to work. Afterward, approach build:electron. 22:12:07
@c0ba1t:matrix.orgCobalt It's a bit late in my TZ so I'm off for today, I can replicate your problem with the yarn.lock and will try to take a look at it tomorrow. 22:15:42
@wst:imagisphe.rewstThanks for your advice. I will take another look tomorrow with some fresh eyes22:18:18
@c0ba1t:matrix.orgCobalt
In reply to @wst:imagisphe.re
So the frontend part lives in joi as far as I understood
* I think that's just their UI kit. The build job in the Makefile only directly calls out to build web (this component itself requires joi but that should just be another node dependency and not it's own derivation) and afterwards electron.
22:16:55
@wst:imagisphe.rewstHowever I also consider I might be a bit out of my depth here, maybe I should just give up. The reason I wanted to package this for myself is that the existing package in nixpkgs extracts the app for AppImage which is not available for arm architecture(even those the sourcefile in nixpkgs erroneously claims it should work for any linux)22:19:55
@wst:imagisphe.rewstI will try to take another stab at it tomorrow I guess and then see how it goes22:20:47
@wst:imagisphe.rewstI appreciate your help and time, thank you!22:21:04
18 Jul 2024
@qfe6mwof7:matrix.orgqfe6mwof7 joined the room.06:24:10
@jayhenks:matrix.orgjayhenks

Anyone able to help me with this problem? I guess I could solve it by going through the Nix source code for buildNpmPackage, but if anyone here knows it would be preferable.

https://discourse.nixos.org/t/need-help-with-buildnpmpackage/49074

11:03:21
22 Jul 2024
@c0ba1t:matrix.orgCobaltI coulnd't quite pin it down. This likely is worth to raise as an issue in nixpkgs.21:00:59
@winter:catgirl.cloudWinter
In reply to @jayhenks:matrix.org

Anyone able to help me with this problem? I guess I could solve it by going through the Nix source code for buildNpmPackage, but if anyone here knows it would be preferable.

https://discourse.nixos.org/t/need-help-with-buildnpmpackage/49074

replied
21:20:35
23 Jul 2024
@ezzobirbezziou:matrix.orgEzzobir Bezziou joined the room.08:22:26
24 Jul 2024
@redstone-menace:matrix.orgRedstone changed their display name from redstone-menace to Redstone.10:17:13
@akechishiro:matrix.orgAkechiShiro joined the room.23:02:41
@akechishiro:matrix.orgAkechiShiro

Hello

I'm trying to package an npm frontend for a Tauri app and the hash of the yarn.lock file seems to change during the build causing an error, computing the hash of the file on my side gives me another hash than what Nix finds on the first build try and putting the hash nix computes the first time yield this following error, I'm at a loss to find a way to fix this issue, if anyone has ever seen this, I may need some help :

yarn.lock changed, you need to update the fetchYarnDeps hash
error: builder for '/nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv' failed with exit code 1;
       last 10 log lines:
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > yarn.lock changed, you need to update the fetchYarnDeps hash
       For full logs, run 'nix log /nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv'.
error: 1 dependencies of derivation '/nix/store/qx2kh0ycqmkdfd206mdcs60vl827b302-opendeck-v2.0.0-beta.10.drv' failed to build
error: 1 dependencies of derivation '/nix/store/35cwqn82bc7y02yk11schajbwcd3c5v5-opendeck-2.0.0-beta.10.drv' failed to build
23:04:39
@akechishiro:matrix.orgAkechiShiro *

Hello

I'm trying to package an npm frontend for a Tauri app and the hash of the yarn.lock file seems to change during the build causing an error, computing the hash of the file on my side gives me another hash than what Nix finds on the first build try and putting the hash nix computes the first time yield this following error, I'm at a loss to find a way to fix this issue, if anyone has ever seen this, thanks for any help :

yarn.lock changed, you need to update the fetchYarnDeps hash
error: builder for '/nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv' failed with exit code 1;
       last 10 log lines:
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > yarn.lock changed, you need to update the fetchYarnDeps hash
       For full logs, run 'nix log /nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv'.
error: 1 dependencies of derivation '/nix/store/qx2kh0ycqmkdfd206mdcs60vl827b302-opendeck-v2.0.0-beta.10.drv' failed to build
error: 1 dependencies of derivation '/nix/store/35cwqn82bc7y02yk11schajbwcd3c5v5-opendeck-2.0.0-beta.10.drv' failed to build
23:05:11
@akechishiro:matrix.orgAkechiShiro *

Hello

I'm trying to package an npm frontend for a Tauri app and the hash of the yarn.lock file seems to change during the build causing an error, computing the hash of the file on my side gives me another hash than what Nix finds on the first build try and putting the hash nix computes the first time yield this following error, I'm at a loss to find a way to fix this issue, if anyone has ever seen this, thanks for any help :

yarn.lock changed, you need to update the fetchYarnDeps hash
error: builder for '/nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv' failed with exit code 1;
       last 10 log lines:
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/gps9qrh99j7g02840wv5x78ykmz30byp-strip.sh
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/kp2j7yn0wzwq5piy494r54dafrh83s6s-gcc-wrapper-13.3.0
       > calling 'envHostTargetHook' function hook 'ccWrapper_addCVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > calling 'envHostTargetHook' function hook 'bintoolsWrapper_addLDVars' /nix/store/9rz99vibv1782dxjkwvxr29s7f2f86wl-binutils-wrapper-2.42
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > yarn.lock changed, you need to update the fetchYarnDeps hash
       For full logs, run 'nix log /nix/store/0fsw2dli4nf7npmd64qwybmy0j5hqvhp-opendeck-modules-v2.0.0-beta.10.drv'.
error: 1 dependencies of derivation '/nix/store/qx2kh0ycqmkdfd206mdcs60vl827b302-opendeck-v2.0.0-beta.10.drv' failed to build
error: 1 dependencies of derivation '/nix/store/35cwqn82bc7y02yk11schajbwcd3c5v5-opendeck-2.0.0-beta.10.drv' failed to build
23:05:19

Show newer messages


Back to Room ListRoom Version: 6