WIP/feedback request: add SSB tale:net #46521
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Opening this as a source-version of #46062 and to gather feedback on the approach. I'm still fairly novice in writing nix expressions and derivations but @NinjaTrappeur suggested I take over patchwork since I'm familiar with the project as a whole and have built an electron client myself. @samueldr also suggested in this comment that a source version would be preferable.
tale:net is not http://github.com/ssbc/patchwork/ but very similar in architecture and spirit. They are both based on http://scuttlebutt.nz/ and are electron apps. Once I figure out the remaining questions, I can adapt the same recipe for patchwork and patchbay
Also: This depends on #45997 but could be decoupled. I thought it would just be easier to test this with both new packages present.
ps: See #46000 for two standalone tools without electron
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)Question:
Previously, I just used this shell.nix to develop. In it, I can run
npm i && npm run build
(which is an alias fornode .electron-vue/build.js && electron-builder
) andrun dev
to make builts and development versions.I discussed with @NinjaTrappeur that this invovles fetching a pre-built electron version from npmjs.com. I'd rather not do this.
In principle it is enough to run
node .electron-vue/build.js && cd ./dist/electron && electron .
and this can work on archlinux, when all the node and electron ABI versions correctly line up.I'm having trouble understanding how to do the
npm i && node .electron-vue/build.js
with node2nix, though. I generated the env from the source package.json and made some changes to it so that it doesn't import nixpkgs twice. The output looks fine but I'm not sure yet how to copynode_modules
into thisout/
or if I should run thenode .electron-vue/build.js
in the embedded node env.propagateBuildInputs
the correct method to have this package as a runtime-dependency to talenet or should add something to the fixupPhase of the node-env?