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

teleport: init at v2.4.0 #33853

Merged
merged 2 commits into from Feb 2, 2018
Merged

teleport: init at v2.4.0 #33853

merged 2 commits into from Feb 2, 2018

Conversation

tomberek
Copy link
Contributor

@tomberek tomberek commented Jan 14, 2018

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.

@tomberek
Copy link
Contributor Author

Took a few tries to fix some whitespace conflicts to all-packages.nix, sorry.

@tomberek tomberek changed the title Add teleport-v2.4.0 teleport: add v2.4.0 Jan 14, 2018
@tomberek tomberek changed the title teleport: add v2.4.0 teleport: init at v2.4.0 Jan 14, 2018
Copy link
Member

@nlewo nlewo left a 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.


goPackagePath = "github.com/gravitational/teleport";
buildPhase = ''
runHook preBuild
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation

@tomberek
Copy link
Contributor Author

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.

@tomberek
Copy link
Contributor Author

@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.

@nlewo
Copy link
Member

nlewo commented Jan 15, 2018

@tomberek I agree it's not documented... but there is a default.nix inside :)

Did you try to specify which subpackages you want to build? For instance:

buildGoPackage rec {
  name = "teleport-unstable-${version}";
  version = "2.4.0";

  goPackagePath = "github.com/gravitational/teleport";
  subPackages = [ "tool/tctl" ];
  # This repo has a private submodule "e" which fetchgit cannot handle
  # without failing. Using fetchurl instead on the latest tagged release.
  src = fetchurl {
    url = "https://github.com/gravitational/teleport/archive/v2.4.0.tar.gz";
    sha256 = "01qcr6vml3ias3gbkqjnb5fmc6ap1fd5mi52ygn3agafy63jb5rd";
  };
  goDeps = ./deps.nix;

  meta = {
    description = "A SSH CA management suite";
    homepage = "https://gravitational.com/teleport/";
    license = stdenv.lib.licenses.asl20;
    maintainers = [ stdenv.lib.maintainers.tomberek ];
    platforms = stdenv.lib.platforms.linux;
  };
}

@tomberek
Copy link
Contributor Author

@nlewo Thanks for the simplifications. (this is my first go package for nixpkgs).

Copy link
Member

@nlewo nlewo left a 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 :)


dontStrip = true;

# This repo has a private submodule "e" which fetchgit cannot handle
Copy link
Member

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.

Copy link
Contributor Author

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.

{ stdenv, buildGoPackage, zip, fetchurl, fetchgit, fetchhg, fetchbzr, fetchsvn }:

buildGoPackage rec {
name = "teleport-unstable-${version}";
Copy link
Member

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

};
*/

goDeps = ./deps.nix;
Copy link
Member

@kamilchm kamilchm Jan 16, 2018

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.

Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing....

@tomberek
Copy link
Contributor Author

@kamilchm @nlewo Thanks for the review!

@nlewo nlewo mentioned this pull request Jan 31, 2018
8 tasks
@nlewo
Copy link
Member

nlewo commented Jan 31, 2018

@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 ];
Copy link
Member

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?

Copy link
Member

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.

@Mic92 Mic92 merged commit 2bd4820 into NixOS:master Feb 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants