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
bee: init at 0.1.0 #91825
bee: init at 0.1.0 #91825
Conversation
Tested with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your first PR 🎉
Looks good, binary seems to work, just two small changes :)
Also, it's common to add a new maintainer in a separate commit. Please split your commit into two: maintainers: add paulperegud
and bee: init at 0.1.0
.
}; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://swarm-gateways.net/bzz:/docs.swarm.eth/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please quote the URL, see NixOS/rfcs#45
{ stdenv, buildGoModule, fetchFromGitHub }: | ||
|
||
buildGoModule rec { | ||
name = "bee-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "bee-${version}"; | |
pname = "bee"; |
The name
will be ${pname}-${version}
automatically.
getting this error:
|
Result of 1 package built:
|
Result of 1 package built:
|
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
bee is at version 0.4.1 at this point. updating to that would most probably fix this issue. i'm new to nix, but i'm willing to try to update this PR and maybe even add a service to it. how shall i proceed? shall i create a new PR and reference this one? or can i get write access to this PR somehow and then i just update this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm very new to all this. i've changed the ~/.cache/nixpkgs-review/pr-91825/build.nix
file, but with my requested changes, it fails to build, and i don't know how to extract more information about the actual error:
$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/alendvai/.cache/nixpkgs-review/pr-91825/build.nix
builder for '/nix/store/dkxm5g3fb9pdfvmlcy1s22p8y8326q6a-bee-0.4.1.drv' failed with exit code 1; last 10 log lines:
github.com/pelletier/go-toml
github.com/spf13/afero/mem
github.com/spf13/afero
github.com/spf13/cast
github.com/spf13/jwalterweatherman
github.com/subosito/gotenv
gopkg.in/ini.v1
gopkg.in/yaml.v2
github.com/spf13/viper
golang.org/x/crypto/ssh/terminal
cannot build derivation '/nix/store/3s49s30yn4kgka6fishzhjb2s2lhls3b-env.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/3s49s30yn4kgka6fishzhjb2s2lhls3b-env.drv' failed
|
||
buildGoModule rec { | ||
pname = "bee"; | ||
version = "0.1.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = "0.1.0"; | |
version = "0.4.1"; |
owner = "ethersphere"; | ||
repo = "bee"; | ||
rev = "v${version}"; | ||
sha256 = "1iwwhs2zm8ml484sc0d7smmmp1x893zjafr1mnaswl8pxg0lnm2l"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sha256 = "1iwwhs2zm8ml484sc0d7smmmp1x893zjafr1mnaswl8pxg0lnm2l"; | |
sha256 = "1bmgbav52pcb5p7cgq9756512fzfqhjybyr0dv538plkqx47mpv7"; |
sha256 = "1iwwhs2zm8ml484sc0d7smmmp1x893zjafr1mnaswl8pxg0lnm2l"; | ||
}; | ||
|
||
vendorSha256 = "1a9fmf5c3asvylcb0ixlwb6jk2z5hzdaa6yffg1pjvq9rx92jbjy"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vendorSha256 = "1a9fmf5c3asvylcb0ixlwb6jk2z5hzdaa6yffg1pjvq9rx92jbjy"; | |
vendorSha256 = "0j393va4jrg9q3wlc9mgkbpgnn2w2s3k2hcn8phzj8d5fl4n4v2h"; |
I'm also trying to create a 4.1 build basing on this PR. Debugging things that you are seeing. BTW - I'm also pretty new to nix :-) |
Yeah, create a new one and write in the description of it that it replaces this one.
That is not possible that easily. |
take a look into the logs directory. There are the full logs. |
so, the issue is that it builds fine, but fails with an assert at runtime:
the actual issue we are facing is discussed here: quic-go/quic-go#2614 according to this, it should work using but on the other hand, if i check out the version from the bee repo, then i can build it using golang 1.15, which is strange to me.
maybe it's because buildGoModule is not building with the exact same dependencies as a FTR, this is the default.nix that i tried:
|
You can change the verison of go used by replacing buildGoModule wit heg buildGo114Module. |
i have a reasonable default.nix for bee now that i think should work, but it doesn't compile, because of missing header files:
my default.nix:
as you can see i have specified the dependencies with this is also not a very useful error message for a newcomer like me:
EDIT: i think i found the right spell, but it didn't help me get any further:
@SuperSandro2000 any hints on what to read/understand, or any examples to look at? i even searched github for |
The dev dependency is has .dev if there is one. buildInputs should be smart enough to choose that. The hidapi header file is this
Same with You either need to change the includes or patch the includes.
Nix 3.0 should improve this by a bit.
You can't do this. Go into the root of your nixpkgs clone and run
That opens a nix-shell in that environment. You need to run some function like genericPhase or so. Don't remember the actual name right now.
You should get a message if you missed something if I mentioned you and I normally don't write that much on IRC. |
@SuperSandro2000 thanks a whole lot! i can now compile a bee and bee-unstable package. my branch has extensive changes on top of these two commits, so i'll open another PR that supersedes it once bee-clef and the bee service part is also packaged properly. |
@paulperegud i'm making good progress with the packaging and created another (draft) PR: #109393 let me know if you wish to be included in the maintainers metadata. i've added you for now, but if you ask i can leave you out of this. @SuperSandro2000 i'd appreciate any/all hints/reviews on the new PR. |
@attila-lendvai Thank you! So I'm closing this one. |
Motivation for this change
Bee is an official implementation of Ethereum's Swarm - distributed storage platform.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)