Closed kamilchm closed 8 years ago
Is there any reason not to use buildFromGitHub
for go packages hosted on GitHub?
It was simple to start with fetch + vcs
without any conditional branches.
Using fetchFromGithub
could be the next improvement after we find a base form for easy overridable derivations.
One more thought. Maybe we don't need any nix specific tool and we could use godep json from nix, eg.:
extraSrcs = stdenv.lib.importJSON ./Godeps/Godeps.json;
What do you think?
Wrong, godep doesn't produce checksums for dependencies :/
Is there any way to use intentional dependencies in the nix store ? I think that we can trust git commit ids to be unique.
You mean, searching dependencies in nix store and reuse it?
I mean if we could use the git sha key as the store key then we wouldn't have to calculate the checksum of the git folder. Right now it's a bit redundant to have both checksums if we trust git to always return the same data.
It looks like it's not implemented though: https://github.com/NixOS/nix/issues/296
buildGoPackage
can use json files for dependencies like in https://github.com/NixOS/nixpkgs/blob/7d02cc1dd50766058b2ec2c6d3a741d96db5d27b/doc/languages-frameworks/go.xml and go2nix
master supports this new format.
I think this is great step in the right direction, but I think there are still a few nits. When I wrap up work tonight, I'll have more constructive feedback, and might push up branch that's based 90% on this, plus a few changes.