17 Jul 2024 |
Cobalt | To build the electron app, you require a compiled version of the frontend. | 21:48:54 |
Cobalt | And the compiled frontend + docs needs to be copied into the electron source in copy:assets . | 21:51:33 |
wst | Yep, that's what I'm trying to do. | 21:56:41 |
Cobalt | So my first guess would be to
- build the frontend and then
- 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 | I 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 repo | 22:01:47 |
Cobalt | * So my first guess would be to
- build the frontend and then
- 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 | But I'm getting ahead of myself | 22:01:55 |
wst | I see | 22:03:44 |
wst | So the frontend part lives in joi as far as I understood | 22:05:06 |
Cobalt | I'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 | To build it I would need to run first pull the dependencies in advance, since there's no network while building derivation | 22:06:20 |
Cobalt | Redacted or Malformed Event | 22:05:20 |
Cobalt | 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 |
Cobalt | 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 |
Cobalt | 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 | Thanks for your advice. I will take another look tomorrow with some fresh eyes | 22:18:18 |
Cobalt | 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 | However 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 | I will try to take another stab at it tomorrow I guess and then see how it goes | 22:20:47 |
wst | I appreciate your help and time, thank you! | 22:21:04 |
18 Jul 2024 |
| qfe6mwof7 joined the room. | 06:24:10 |
jayhenks | 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 |
Cobalt | I coulnd't quite pin it down. This likely is worth to raise as an issue in nixpkgs. | 21:00:59 |
Winter | 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 |
| Ezzobir Bezziou joined the room. | 08:22:26 |
24 Jul 2024 |
| Redstone changed their display name from redstone-menace to Redstone. | 10:17:13 |
| AkechiShiro joined the room. | 23:02:41 |
AkechiShiro | 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 | * 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 | * 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 |