From 2ffaa244b77db6ba38a732622c991ea1c0a7e4d2 Mon Sep 17 00:00:00 2001 From: Martin Hardselius Date: Tue, 12 Oct 2021 10:21:15 +0200 Subject: [PATCH 1/3] maintainers: add hardselius --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 0ad951e1d16b..0e452d9f65c5 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4381,6 +4381,16 @@ githubId = 54728477; name = "Happy River"; }; + hardselius = { + email = "martin@hardselius.dev"; + github = "hardselius"; + githubId = 1422583; + name = "Martin Hardselius"; + keys = [{ + longkeyid = "rsa4096/0x03A6E6F786936619"; + fingerprint = "3F35 E4CA CBF4 2DE1 2E90 53E5 03A6 E6F7 8693 6619"; + }]; + }; haslersn = { email = "haslersn@fius.informatik.uni-stuttgart.de"; github = "haslersn"; From 9d6bc0f1afc096c293cc08423e4a4919973298a1 Mon Sep 17 00:00:00 2001 From: Martin Hardselius Date: Tue, 12 Oct 2021 10:27:24 +0200 Subject: [PATCH 2/3] steampipe: init at 0.8.5 --- pkgs/tools/misc/steampipe/default.nix | 30 +++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/misc/steampipe/default.nix diff --git a/pkgs/tools/misc/steampipe/default.nix b/pkgs/tools/misc/steampipe/default.nix new file mode 100644 index 000000000000..0df0b3c4e31c --- /dev/null +++ b/pkgs/tools/misc/steampipe/default.nix @@ -0,0 +1,30 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "steampipe"; + version = "0.8.5"; + + src = fetchFromGitHub { + owner = "turbot"; + repo = "steampipe"; + rev = "v${version}"; + sha256 = "sha256-3vetSUJwCeaBzKj+635siskfcDPs/kkgCH954cg/REA="; + }; + + vendorSha256 = "sha256-TGDFNHWWbEy1cD7b2yPqAN7rRrLvL0ZX/R3BWGRWjjw="; + + # tests are failing for no obvious reasons + doCheck = false; + + ldflags = [ + "-s" + "-w" + ]; + + meta = with lib; { + homepage = "https://steampipe.io/"; + description = "select * from cloud;"; + license = licenses.agpl3; + maintainers = with maintainers; [ hardselius ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3f7c3bd803a0..72e707ec231e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3435,6 +3435,8 @@ with pkgs; statserial = callPackage ../tools/misc/statserial { }; + steampipe = callPackage ../tools/misc/steampipe { }; + step-ca = callPackage ../tools/security/step-ca { inherit (darwin.apple_sdk.frameworks) PCSC; }; From 7ee41e85e80f0f9ec9853ba841efb251d15328ad Mon Sep 17 00:00:00 2001 From: Martin Hardselius Date: Wed, 13 Oct 2021 22:20:33 +0200 Subject: [PATCH 3/3] steampipe: install shell completion --- pkgs/tools/misc/steampipe/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/steampipe/default.nix b/pkgs/tools/misc/steampipe/default.nix index 0df0b3c4e31c..691351c89b08 100644 --- a/pkgs/tools/misc/steampipe/default.nix +++ b/pkgs/tools/misc/steampipe/default.nix @@ -1,4 +1,4 @@ -{ lib, buildGoModule, fetchFromGitHub }: +{ lib, buildGoModule, fetchFromGitHub, installShellFiles }: buildGoModule rec { pname = "steampipe"; @@ -16,11 +16,21 @@ buildGoModule rec { # tests are failing for no obvious reasons doCheck = false; + nativeBuildInputs = [ installShellFiles ]; + ldflags = [ "-s" "-w" ]; + postInstall = '' + 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) + ''; + meta = with lib; { homepage = "https://steampipe.io/"; description = "select * from cloud;";