Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-ssb: add build dependency #49473

Merged
merged 1 commit into from Oct 30, 2018
Merged

git-ssb: add build dependency #49473

merged 1 commit into from Oct 30, 2018

Conversation

patrl
Copy link
Contributor

@patrl patrl commented Oct 30, 2018

Motivation for this change

nodePackages.git-ssb currently fails to build because of a missing build dependency, cc @cryptix.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@cryptix
Copy link
Contributor

cryptix commented Oct 30, 2018

Ouch..! I had this commit laying around as well.... thank you!

@cryptix
Copy link
Contributor

cryptix commented Oct 30, 2018

A problem with git-ssb is that the more recent versions are only available through ssb-npm. integrating a second registry into the global nodePackages seems messy...

I’d be keen to work on a nixos ssb channel if there is more interest.

@cryptix
Copy link
Contributor

cryptix commented Oct 30, 2018

Alternatively a copy of the nodePackages approach to a another directory seems possible but than the hydra would have to have access to ssb-npm? I guess that’s out of the question...

@patrl
Copy link
Contributor Author

patrl commented Oct 30, 2018

@cryptix yeah, the git-ssb issue had occurred to me. Naively I thought that what we want is a git fetcher for nix that supports the ssb protocol, which itself would need to be built on top of git-ssb.

I'm also interested in how we should package scuttlebot modules. The current situation isn't ideal, since if the version of node on the path doesn't match the version used to built scuttlebot, then modules installed via sbot module.install won't work. Maybe we should open a new issue to discuss this?

For reference, the implementation details for the built-in fetchers can be found here. Looks like implementing a fetcher for git-ssb shouldn't be too complicated. Ultimately, it would also be nice to have a fetcher for the dat protocol. It looks like there's already a fetcher for ipfs, although I haven't tried it.

EDIT: Nevermind, after reading up on ssb-npm, I see what the issue is. It's going to be a real pain integrating this into the nix infrastructure.

@dywedir
Copy link
Member

dywedir commented Oct 30, 2018

@GrahamcOfBorg build nodePackages.git-ssb

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: nodePackages.git-ssb

Partial log (click to expand)

npm ERR! sodium-native@2.2.2 install: `node-gyp-build "node preinstall.js" "node postinstall.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sodium-native@2.2.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /build/.npm/_logs/2018-10-30T18_22_40_557Z-debug.log
builder for '/nix/store/abm9k7n6fjq44aj46jdflj9licgd0g9b-node-git-ssb-2.3.6.drv' failed with exit code 1
error: build of '/nix/store/abm9k7n6fjq44aj46jdflj9licgd0g9b-node-git-ssb-2.3.6.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nodePackages.git-ssb

Partial log (click to expand)

shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-48.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-50.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-64.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/node-47.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-57.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-53.node
shrinking /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6/lib/node_modules/git-ssb/node_modules/sodium-native/prebuilds/linux-x64/electron-54.node
patching script interpreter paths in /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6
checking for references to /build in /nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6...
/nix/store/jbpgxg3j3b5wq1qap64rzamwi5lk7r7f-node-git-ssb-2.3.6

@dywedir dywedir merged commit 032a2b3 into NixOS:master Oct 30, 2018
@patrl patrl deleted the git-ssb branch October 30, 2018 18:33
@cryptix
Copy link
Contributor

cryptix commented Oct 31, 2018

Nevermind, after reading up on ssb-npm, I see what the issue is. It's going to be a real pain integrating this into the nix infrastructure.

yup. That is why I think a second channel / git tree that’s imports would be the most sensible.

People could use the generate.sh to clone their own or trust a published version through a channel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants