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

prometheus-mpd-exporter: init at 0.1.0 #108342

Closed

Conversation

matthiasbeyer
Copy link
Contributor

Motivation for this change

Wrote this today and would find it useful if it were in nixpkgs. Others might be interested as well.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

I don't know how to properly test the service, but I have a similar service already running on two of my machines.

extraOpts = {
port = mkOption {
type = types.port;
default = "9123";
Copy link
Member

Choose a reason for hiding this comment

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


rustPlatform.buildRustPackage rec {
pname = "prometheus-mpd-exporter";
version = "v0.1.0";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
version = "v0.1.0";
version = "0.1.0";


src = fetchgit {
url = "https://git.beyermatthi.as/prometheus-mpd-exporter";
rev = version;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rev = version;
rev = "v${version}";

@SuperSandro2000
Copy link
Member

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.

Result of nixpkgs-review pr 108342 run on x86_64-linux 1

1 package blacklisted:
  • tests.nixos-functions.nixos-test
1 package built:
  • prometheus-mpd-exporter

maintainers = with maintainers; [ matthiasbeyer ];
};
}

Copy link
Member

Choose a reason for hiding this comment

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

Please remove the extra 2 new lines.


cargoSha256 = "0snrfcjawla9ra40x22w5zrr8xnsyhlyj21di8gp5wzf0yj1a9n1";

nativeBuildInputs = [ pkg-config openssl ];
Copy link
Member

Choose a reason for hiding this comment

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

if it links against openssl it need to go to buildInputs.

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Comment on lines +10 to +16
port = mkOption {
type = types.port;
default = "9806";
description = ''
Port to bind to
'';
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
port = mkOption {
type = types.port;
default = "9806";
description = ''
Port to bind to
'';
};

port is a default option, it is already defined in exporters.nix

@riotbib
Copy link
Member

riotbib commented Aug 1, 2021

I am interested in this software being in nixpkgs.

May someone fill me in, why this merge request was closed?

@matthiasbeyer
Copy link
Contributor Author

Because I don't care enough. I compile it myself in my configuration.nix and that's it.

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

5 participants