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
teleport: init at v2.4.0 #33853
teleport: init at v2.4.0 #33853
Conversation
a885fb5
to
d21cdd8
Compare
d21cdd8
to
ca274f5
Compare
Took a few tries to fix some whitespace conflicts to all-packages.nix, sorry. |
ca274f5
to
f0dbcff
Compare
f0dbcff
to
ad83466
Compare
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 didn't really reviewed your PR yet since I think you should try to use go2nix V2 branch. This version of go2nix uses Gopkg.lock file which is available in teleport, so you should be able to generate deps.nix
file.
pkgs/servers/teleport/default.nix
Outdated
|
||
goPackagePath = "github.com/gravitational/teleport"; | ||
buildPhase = '' | ||
runHook preBuild |
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.
Indentation
Thanks. I was not aware of the V2. This application does have a few quirks to build/install. I’ll push an update if the end result is cleaner. |
ad83466
to
3854aaf
Compare
@nlewo Took a while to get v2 working. The deps.nix file is now populated. Sadly much of the cruft was still needed to build correctly. |
@tomberek I agree it's not documented... but there is a Did you try to specify which subpackages you want to build? For instance:
|
3854aaf
to
6a12c51
Compare
@nlewo Thanks for the simplifications. (this is my first go package for nixpkgs). |
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.
Last remarks form my side :)
pkgs/servers/teleport/default.nix
Outdated
|
||
dontStrip = true; | ||
|
||
# This repo has a private submodule "e" which fetchgit cannot handle |
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.
It seems the commit you were using (df6caeae7d90e520478244d583cd9e60d924fb32
) is not the commit ID for the tag 2.4.0. So, maybe there is a diff between the deps you genreated and the soruce code you are using.
- You can fetch an archive for a particular commit ID on github or
- Set this attribute: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/fetchgit/default.nix#L16 or
- Generate deps by checking out tag 2.4.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.
Correct, that was master a few days ago. Good catch. But we're not longer using deps... so meh.
pkgs/servers/teleport/default.nix
Outdated
{ stdenv, buildGoPackage, zip, fetchurl, fetchgit, fetchhg, fetchbzr, fetchsvn }: | ||
|
||
buildGoPackage rec { | ||
name = "teleport-unstable-${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.
Remove "unstable" from the name
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.
done
pkgs/servers/teleport/default.nix
Outdated
}; | ||
*/ | ||
|
||
goDeps = ./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.
Try to ignore goDeps
here, there's missing vendor scaning logic in go2nix v2. Packages from Gopkg.lock
should be added to deps.nix
only when they doesn't exists in vendor
dir.
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 confirm this works well without deps.nix
.
I didn't realize goBuildPackage
uses the vendor
directory and I don't really know what to think about this: I like to be able to know what are the build requires by querying the Nix store and this is no longer possible when the vendor
directorys used. But this is another story:)
For now, I think we could remove 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.
removing....
6a12c51
to
15ecff8
Compare
15ecff8
to
256d147
Compare
@Mic92 could you have a look please? |
description = "A SSH CA management suite"; | ||
homepage = "https://gravitational.com/teleport/"; | ||
license = stdenv.lib.licenses.asl20; | ||
maintainers = [ stdenv.lib.maintainers.tomberek ]; |
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.
@kimburgess do you also want to maintain this package?
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 all good staying out of this one - I'm not affiliated with Teleport, my other PR was just to get it into the repo for ease of use.
If there's an update that needs repacking in the future I'm happy to step up as a contributor / maintainer then and help out.
Motivation for this change
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)