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

ipget: init at 0.2.5 #30704

Merged
merged 1 commit into from Oct 23, 2017
Merged

ipget: init at 0.2.5 #30704

merged 1 commit into from Oct 23, 2017

Conversation

veprbl
Copy link
Member

@veprbl veprbl commented Oct 23, 2017

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

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

})
];

goDeps = ../../../tools/package-management/gx/deps.nix;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Member

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 = [
Copy link
Member

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?

Copy link
Member Author

@veprbl veprbl Oct 23, 2017

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.

@Mic92 Mic92 merged commit 5fc37f2 into NixOS:master Oct 23, 2017
@cstrahan cstrahan mentioned this pull request Nov 5, 2017
6 tasks
@veprbl veprbl deleted the ipget branch December 1, 2020 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants