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

nixos/gnunet: create switch for package. #39681

Merged
merged 1 commit into from May 11, 2018
Merged

nixos/gnunet: create switch for package. #39681

merged 1 commit into from May 11, 2018

Conversation

pstn
Copy link
Contributor

@pstn pstn commented Apr 29, 2018

Motivation for this change

Add switch to the gnunet service to make gnunet_git usable with the service.

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.

Here's the promised switch, @viric

@@ -102,6 +102,12 @@ in
};
};

package = mkOption {
default = pkgs.gnunet;
description = "Overridable attribute of the gnunet package to use.";
Copy link
Member

Choose a reason for hiding this comment

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

You should add defaultText = "pkgs.gnunet";.

@@ -130,16 +136,16 @@ in

# The user tools that talk to `gnunetd' should come from the same source,
# so install them globally.
environment.systemPackages = [ pkgs.gnunet ];
environment.systemPackages = [ config.services.gnunet.package ];
Copy link
Member

Choose a reason for hiding this comment

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

Please use cfg instead of config.services.gnunet.


systemd.services.gnunet = {
description = "GNUnet";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
path = [ pkgs.gnunet pkgs.miniupnpc ];
path = [ config.services.gnunet.package pkgs.miniupnpc ];
Copy link
Member

Choose a reason for hiding this comment

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

Is the gnunet package really needed in here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@viric put it there to get upnp working. 4f71bce

default = pkgs.gnunet;
defaultText = "pkgs.gnunet";
description = "Overridable attribute of the gnunet package to use.";
example = "pkgs.gnunet_git";
Copy link
Member

Choose a reason for hiding this comment

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

Please use example = literalExample "pkgs.gnunet_git" here.

@@ -102,6 +102,13 @@ in
};
};

package = mkOption {
default = pkgs.gnunet;
Copy link
Member

Choose a reason for hiding this comment

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

You should add type = types.package

package = mkOption {
default = pkgs.gnunet;
defaultText = "pkgs.gnunet";
description = "Overridable attribute of the gnunet package to use.";
Copy link
Member

Choose a reason for hiding this comment

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

I think this is usually just "Gnunet package to use."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stole that one from services.matrix-synapse.package

@dotlambda dotlambda merged commit d283368 into NixOS:master May 11, 2018
@pstn pstn deleted the gnunet-service branch May 12, 2018 13:06
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

3 participants