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
ipget: init at 0.2.5 #30704
ipget: init at 0.2.5 #30704
Conversation
}) | ||
]; | ||
|
||
goDeps = ../../../tools/package-management/gx/deps.nix; |
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.
Is it truly the same dependecies set? It looks like it would be better to ipget to have its own deps here. You can try to use go2nix to generate new deps.nix.
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 tried and I couldn't do even the step 1 of your instruction really:
% export GOPATH=`pwd`
% go get -d github.com/ipfs/ipget
package gx/ipfs/QmQa2wf1sLFKkjHCVEbna8y5qhdMjL8vtTJSAc48vZGTer/go-ipfs/path: unrecognized import path "gx/ipfs/QmQa2wf1sLFKkjHCVEbna8y5qhdMjL8vtTJSAc48vZGTer/go-ipfs/path" (import path does not begin with hostname)
package gx/ipfs/QmVcLF2CgjQb5BWmYFWsDfxDjbzBfcChfdHRedxeL3dV4K/cli: unrecognized import path "gx/ipfs/QmVcLF2CgjQb5BWmYFWsDfxDjbzBfcChfdHRedxeL3dV4K/cli" (import path does not begin with hostname)
package gx/ipfs/Qmdk8Ea9GkbwHr7UNKVYaLRwwHSt69xBXuSvRVyNWZ9sZE/fallback-ipfs-shell: unrecognized import path "gx/ipfs/Qmdk8Ea9GkbwHr7UNKVYaLRwwHSt69xBXuSvRVyNWZ9sZE/fallback-ipfs-shell" (import path does not begin with hostname)
You see, ipfs projects use their own dependency management stack called gx
, which, according to them, is a different thing from what is usually used in go. However it seems like not everything that is needed for build gets downloaded by gx
, this is why this needed goDeps attribute as well.
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 have a hunch that these missing dependencies are really just dependencies of gx
that are somehow leaking through into the ipget
build.
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.
So go2nix
would need to support gx
to be used here.
|
||
goPackagePath = "github.com/ipfs/ipget"; | ||
|
||
extraSrcPaths = [ |
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.
what's the relation between fetchgx
and fetchFromGitHub
sources?
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.
There is no relation. As I understand, fetchgx
learns about relevant dependencies independently via IPNS and then downloads everything from IPFS. On our side we just put all dependencies in one fixed-hash derivation. I think this is the same way as how rust/cargo in nixpkgs currently work in nixpkgs.
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)I have to reuse deps file from gx. If I don't I get an error about missing dependencies that completely matches what is broken in upstream CI:
https://travis-ci.org/ipfs/ipget/jobs/231391696
I don't know much about go and could not succeed with generating deps file with
go2nix
, so cc @fpletz @kamilchm