mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-14 16:14:50 +00:00
![Silvan Mosberger](/assets/img/avatar_default.png)
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
89 lines
2.3 KiB
Nix
89 lines
2.3 KiB
Nix
{
|
|
buildGoModule,
|
|
fetchFromGitHub,
|
|
installShellFiles,
|
|
lib,
|
|
makeWrapper,
|
|
nix-update-script,
|
|
steampipe,
|
|
testers,
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "steampipe";
|
|
version = "1.0.1";
|
|
|
|
CGO_ENABLED = 0;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "turbot";
|
|
repo = "steampipe";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-9Tlc6BlfSQyAmmk/G6TdWB0kWpbwzGWOPNNNgI3tYPM=";
|
|
};
|
|
|
|
vendorHash = "sha256-+y9OX/ywS/0AXCnVHf4VisTegFamt3sT/m43yVhbCNc=";
|
|
proxyVendor = true;
|
|
|
|
postPatch = ''
|
|
# Patch test that relies on looking up homedir in user struct to prefer ~
|
|
substituteInPlace pkg/steampipeconfig/shared_test.go \
|
|
--replace-fail 'filehelpers "github.com/turbot/go-kit/files"' "" \
|
|
--replace-fail 'app_specific.InstallDir, _ = filehelpers.Tildefy("~/.steampipe")' 'app_specific.InstallDir = "~/.steampipe"';
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
makeWrapper
|
|
];
|
|
|
|
ldflags = [
|
|
"-s"
|
|
"-w"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
checkFlags =
|
|
let
|
|
skippedTests = [
|
|
# panic: could not create backups directory: mkdir /var/empty/.steampipe: operation not permitted
|
|
"TestTrimBackups"
|
|
];
|
|
in
|
|
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/steampipe \
|
|
--set-default STEAMPIPE_UPDATE_CHECK false \
|
|
--set-default STEAMPIPE_TELEMETRY none
|
|
|
|
INSTALL_DIR=$(mktemp -d)
|
|
installShellCompletion --cmd steampipe \
|
|
--bash <($out/bin/steampipe --install-dir $INSTALL_DIR completion bash) \
|
|
--fish <($out/bin/steampipe --install-dir $INSTALL_DIR completion fish) \
|
|
--zsh <($out/bin/steampipe --install-dir $INSTALL_DIR completion zsh)
|
|
'';
|
|
|
|
passthru = {
|
|
tests.version = testers.testVersion {
|
|
command = "${lib.getExe steampipe} --version";
|
|
package = steampipe;
|
|
version = "v${version}";
|
|
};
|
|
updateScript = nix-update-script { };
|
|
};
|
|
|
|
meta = {
|
|
changelog = "https://github.com/turbot/steampipe/blob/v${version}/CHANGELOG.md";
|
|
description = "Dynamically query your cloud, code, logs & more with SQL";
|
|
homepage = "https://steampipe.io/";
|
|
license = lib.licenses.agpl3Only;
|
|
mainProgram = "steampipe";
|
|
maintainers = with lib.maintainers; [
|
|
hardselius
|
|
anthonyroussel
|
|
];
|
|
};
|
|
}
|