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

kore: init at 2.0.0 #29989

Merged
merged 2 commits into from Oct 1, 2017
Merged

kore: init at 2.0.0 #29989

merged 2 commits into from Oct 1, 2017

Conversation

JohnMH
Copy link
Contributor

@JohnMH JohnMH commented Oct 1, 2017

Things done

Include kore web framework

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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.

homepage = https://kore.io;
license = licenses.isc;
platforms = platforms.all;
maintainers = [ "John M. Harris, Jr. <johnmh@openblox.org>" ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add yourself to lib/maintainers.nix?

{ stdenv, callPackage, openssl }:

let
source = callPackage ./source.nix { };
Copy link
Contributor

@orivej orivej Oct 1, 2017

Choose a reason for hiding this comment

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

Why did you put the source in a separate file? Generally this is only accepted when it must be updated by tools that cannot update default.nix.


preConfigure = ''
makeFlags="$makeFlags PREFIX=$out"
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

Try makeFlags = [ "PREFIX=$(out)" ].

stdenv.mkDerivation {
name = "kore-${source.version}";

src = source.src;
Copy link
Member

Choose a reason for hiding this comment

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

Why did you put src in a separate file?

homepage = https://kore.io;
license = licenses.isc;
platforms = platforms.all;
maintainers = [ "John M. Harris, Jr. <johnmh@openblox.org>" ];
Copy link
Member

Choose a reason for hiding this comment

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

Add yourself to https://github.com/NixOS/nixpkgs/blob/master/lib/maintainers.nix instead so that you can just do maintainers = with maintainers; [ JohnMHarrisJr ];

@JohnMH
Copy link
Contributor Author

JohnMH commented Oct 1, 2017

Thanks for all the feedback, noticed some issues myself as soon as I submitted the PR.

@JohnMH JohnMH force-pushed the master branch 2 times, most recently from ecc1167 to 62e438a Compare October 1, 2017 17:31
@JohnMH JohnMH requested a review from edolstra as a code owner October 1, 2017 17:31
@@ -287,6 +287,7 @@
joelmo = "Joel Moberg <joel.moberg@gmail.com>";
joelteon = "Joel Taylor <me@joelt.io>";
johbo = "Johannes Bornhold <johannes@bornhold.name>";
johnmh = "John M. Harris, Jr. <johnmh@openblox.org>";
Copy link
Member

Choose a reason for hiding this comment

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

The attribute name here should be your GitHub handle as it says at the top of the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vyp That's absolutely horrible. I shouldn't even have to have a GitHub 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 has to be unique like this otherwise what if https://github.com/johnmh ever wants to maintain anything. Also it makes it easier to @ ping people.

I agree with the sentiment that needing a GitHub account is not great, but seeing as though to add a package to the official nixpkgs repository, you have to make a GitHub "pull request" adding it, which requires one to sign up to and use GitHub, I don't see that much of an issue here in requiring it. Might as well utilize GitHub handles if nixpkgs is hosted on GitHub in my opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't actually log into the GitHub website unless I actually need to make a 'pull request'. I go by 'JohnMH' on everything but GitHub, IRC included. "pinging" me here wouldn't help anyone.

Copy link
Contributor

@orivej orivej Oct 1, 2017

Choose a reason for hiding this comment

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

That's not ideal, but acceptable. In fact maintainers.nix already contains some attributes that are different from GitHub accounts of their owners and conflict with names of accounts of unrelated people who luckily do not contribute to Nix. (I don't remember who exactly.)

Copy link
Member

@vyp vyp Oct 1, 2017

Choose a reason for hiding this comment

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

In your GitHub settings under notifications you can set it so that you get an email if you get @ mentioned. And even so, that still means that https://github.com/johnmh would be forced into using something other than their username, and that would just make things worse. The best and easiest way is to stick to exactly what your GitHub username is.

Copy link
Member

Choose a reason for hiding this comment

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

@orivej, I know that @edolstra is one. 😝

src = fetchFromGitHub {
owner = "jorisvink";
repo = "kore";
rev = "a16348d5241b0b82f09c51cf3161872b6916cd76";
Copy link
Member

Choose a reason for hiding this comment

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

rev = "2.0.0-release";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't realize GitHub supported owner/repo/archive/tagname-release.format. I'll go change that now.

Copy link
Member

Choose a reason for hiding this comment

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

Actually the upstream tagname itself is "2.0.0-release", so it's just referring to a git tag, not any GitHub format or anything.

@orivej
Copy link
Contributor

orivej commented Oct 1, 2017

Please review my changes in 717e6ac

The patch is needed because without it path/to/kore run will fail when kore is not in PATH.

@JohnMH
Copy link
Contributor Author

JohnMH commented Oct 1, 2017

@orivej Is that actually necessary? It substitutes PREFIX in before that, and PREFIX is set to $out

@orivej
Copy link
Contributor

orivej commented Oct 1, 2017

In kore masterit is no longer necessary (src/cli.c#L1399), but in 2.0.0 it is (src/cli.c#L1231).

@JohnMH
Copy link
Contributor Author

JohnMH commented Oct 1, 2017

Ah, I see. Thanks for the help with this, both of you.

@orivej orivej merged commit 016df11 into NixOS:master Oct 1, 2017
@orivej
Copy link
Contributor

orivej commented Oct 1, 2017

Thank you too!

@JohnMH
Copy link
Contributor Author

JohnMH commented Oct 1, 2017

@vyp I managed to get the username JohnMH anyway, so am I good now? :)

@vyp
Copy link
Member

vyp commented Oct 2, 2017

@JohnMH yes of course! And also to be fair to you, people commonly do change their github usernames so a lot of names eventually become out of sync anyway (so the @ mentioning wouldn't work), and there's not much nixpkgs can do about that. So I feel like the email address is a more reliable identifier as I would say people change that much less often. It was just really more of a convenience thing and a way to avoid any potential future conflicts. 🙌

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