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

Go packages, buildGoPackage #6119

Merged
merged 22 commits into from Feb 7, 2015

Conversation

Projects
None yet
6 participants
@lethalman
Contributor

lethalman commented Feb 3, 2015

Based on PR #4222 , also ported ngrok, didn't test it but the binaries run. cc @iElectric are you fine with this kind of build?

@ehmry I've added $makeFlags to go install call, maybe improper but it's ok for now I think. Also added go13Packages and go14Packages. Removed the crypto package, confirming it's broken with recent go versions.

Build with nix-build -A ngrok.

Packages to port:

  • bosun
  • pond
  • gox
  • etcdctl
  • gocode
  • golint
  • gotags
  • go-repo-root
  • packer (uses gox)
  • consul (uses ruby in the build)
  • etcd
  • influxdb-backup
  • nsq
  • serfdom
  • go-mtpfs
  • go-bindata
  • ngrok
  • flannel
  • syncthing
  • kubernetes (quite custom build)

ehmry and others added some commits Jan 31, 2015

new Go support function 'buildGoPackage'
add a setupHook to the Go compiler that builds a GOPATH
new buildGoPackage function that overides the phases of stdenv
@domenkozar

This comment has been minimized.

Member

domenkozar commented Feb 3, 2015

Looks good. Might wanna delete old ngrok expression.

@ehmry

This comment has been minimized.

Member

ehmry commented Feb 3, 2015

👍
I can't say I think go.crypto is very well maintained, so its not a supprise to me.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 3, 2015

@ehmry as a result I've also dropped cjdcmd, sorry. At a later attempt maybe :)

@ehmry

This comment has been minimized.

Member

ehmry commented Feb 3, 2015

Thats ok, it was a test.

@domenkozar

This comment has been minimized.

Member

domenkozar commented Feb 3, 2015

Awesome!

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

Also cc @cstrahan , retained as maintainer. I've decided to keep ngrok in its own directory instead of under goPackages. Now working on porting the other software.

@offlinehacker

This comment has been minimized.

Contributor

offlinehacker commented Feb 4, 2015

Nice, the last thing we would need is go2nix fixed for a new format.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

@offlinehacker what should go2nix do? I personally don't want packages to be auto updated.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

Just ported pond, which required crypto. So @ehmry it seems to work, it's a different hash though, but at least compiles with go 1.3 :)

ehmry added a commit to ehmry/nixpkgs that referenced this pull request Feb 4, 2015

@ehmry

This comment has been minimized.

Member

ehmry commented Feb 4, 2015

@lethalman I'll check it out.

I also think that auto-updating packages would be trouble, but a tool to generate the package expressions would be very useful.

I had a quick and dirty shell script to do that but I don't know how it compares to go2nix.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

I'm resolving conflicts between package names using the repo name. E.g. rcrowley.go-metrics and armon.go-metrics.

@ehmry

This comment has been minimized.

Member

ehmry commented Feb 4, 2015

Good call

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

@ehmry indeed giving a repo path and automatically creating the nix expression is handy. I just don't like the way npm packages are updated, for example.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 4, 2015

cc @bennofs ported go-mtpfs, hope it's ok for you :)

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 5, 2015

So packer uses gox, and consul also uses ruby in the build. I would leave them as is for now.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 5, 2015

Also I wouldn't touch kubernetes either.

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 5, 2015

@matejc I've ported syncthing to buildGoPackage, does it look fine to you?

@bennofs

This comment has been minimized.

Member

bennofs commented Feb 5, 2015

@lethalman no problem, as long as it works :)

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 5, 2015

Ok so I'm going to merge this in a few days, I will do a quick test of all the packages again. That said, if a ported package doesn't work we can always bring the older version back.

Also I think I'm going to add a flag, like dontInstallSrc to avoid installing the src for packages where it makes sense to only ship executables.

@offlinehacker offlinehacker referenced this pull request Feb 7, 2015

Merged

Add consul alerts #6032

@lethalman

This comment has been minimized.

Contributor

lethalman commented Feb 7, 2015

OK let's merge this and see :)

lethalman added a commit that referenced this pull request Feb 7, 2015

Merge pull request #6119 from lethalman/go
Go packages, buildGoPackage

@lethalman lethalman merged commit 8b236f2 into NixOS:master Feb 7, 2015

1 check failed

continuous-integration/travis-ci The Travis CI build failed
Details
@wmertens

This comment has been minimized.

Contributor

wmertens commented Feb 9, 2015

@domenkozar

This comment has been minimized.

Member

domenkozar commented Aug 26, 2015

I'm using $ nix-build -A packer|&grep "cannot find package" | sed -E 's/cannot find package "(.*)" in any of:/\1/'| cut -d " " -f 2|sort|uniq to get a list of buildInputs

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