depot/third_party/nixpkgs/pkgs/tools/misc/goss/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

57 lines
1.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ buildGoModule
, fetchFromGitHub
, goss
, nix-update-script
, lib
, testers
}:
buildGoModule rec {
pname = "goss";
# Don't forget to update dgoss to the same version.
version = "0.4.2";
src = fetchFromGitHub {
owner = "goss-org";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-FDn1OETkYIpMenk8QAAHvfNZcSzqGl5xrD0fAZPVmRM=";
};
vendorHash = "sha256-n+k7f9e2iqf4KrcDkzX0CWk+Bq2WE3dyUEid4PTP1FA=";
CGO_ENABLED = 0;
ldflags = [
"-s" "-w" "-X main.version=v${version}"
];
checkFlags = [
# Prometheus tests are skipped upstream
# See https://github.com/goss-org/goss/blob/master/ci/go-test.sh
"-skip" "^TestPrometheus"
];
passthru = {
tests.version = testers.testVersion {
command = "goss --version";
package = goss;
version = "v${version}";
};
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://github.com/goss-org/goss/";
changelog = "https://github.com/goss-org/goss/releases/tag/v${version}";
description = "Quick and easy server validation";
longDescription = ''
Goss is a YAML based serverspec alternative tool for validating a servers configuration.
It eases the process of writing tests by allowing the user to generate tests from the current system state.
Once the test suite is written they can be executed, waited-on, or served as a health endpoint.
'';
license = licenses.asl20;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ hyzual jk anthonyroussel ];
};
}