From 7ac2961ee3e212ee69ea5176fcc28f17ba354072 Mon Sep 17 00:00:00 2001 From: Aaron Jheng Date: Fri, 8 Apr 2022 15:05:36 +0000 Subject: [PATCH] terraform-inventory: 0.7-pre -> 0.10 --- .../cluster/terraform-inventory/default.nix | 25 +++++++++++-------- .../cluster/terraform-inventory/deps.nix | 20 --------------- 2 files changed, 14 insertions(+), 31 deletions(-) delete mode 100644 pkgs/applications/networking/cluster/terraform-inventory/deps.nix diff --git a/pkgs/applications/networking/cluster/terraform-inventory/default.nix b/pkgs/applications/networking/cluster/terraform-inventory/default.nix index 085b504314ee..783f9c79bb7f 100644 --- a/pkgs/applications/networking/cluster/terraform-inventory/default.nix +++ b/pkgs/applications/networking/cluster/terraform-inventory/default.nix @@ -1,22 +1,25 @@ -{ lib, buildGoPackage, fetchFromGitHub}: +{ lib, buildGoModule, fetchFromGitHub, testers, terraform-inventory }: -buildGoPackage rec { +buildGoModule rec { pname = "terraform-inventory"; - version = "0.7-pre"; - rev = "v${version}"; - - goPackagePath = "github.com/adammck/terraform-inventory"; - - subPackages = [ "./" ]; + version = "0.10"; src = fetchFromGitHub { - inherit rev; owner = "adammck"; repo = "terraform-inventory"; - sha256 = "0wwyi2nfyn3wfpmvj8aabn0cjba0lpr5nw3rgd6qdywy7sc3rmb1"; + rev = "v${version}"; + sha256 = "sha256-gkSDxcBoYmCBzkO8y1WKcRtZdfl8w5qVix0zbyb4Myo="; }; - goDeps = ./deps.nix; + vendorSha256 = "sha256-pj9XLzaGU1PuNnpTL/7XaKJZUymX+i8hFMroZtHIqTc="; + + ldflags = [ "-s" "-w" "-X main.build_version=${version}" ]; + + doCheck = false; + + passthru.tests.version = testers.testVersion { + package = terraform-inventory; + }; meta = with lib; { homepage = "https://github.com/adammck/terraform-inventory"; diff --git a/pkgs/applications/networking/cluster/terraform-inventory/deps.nix b/pkgs/applications/networking/cluster/terraform-inventory/deps.nix deleted file mode 100644 index 9f7b5e317fe3..000000000000 --- a/pkgs/applications/networking/cluster/terraform-inventory/deps.nix +++ /dev/null @@ -1,20 +0,0 @@ -[ - { - goPackagePath = "github.com/adammck/venv"; - fetch = { - type = "git"; - url = "https://github.com/adammck/venv"; - rev = "8a9c907a37d36a8f34fa1c5b81aaf80c2554a306"; - sha256 = "1fzk3j4q59kpd2ks2aw8rmic6b123p5mh981cjh0kzs716grc6y8"; - }; - } - { - goPackagePath = "github.com/blang/vfs"; - fetch = { - type = "git"; - url = "https://github.com/blang/vfs"; - rev = "c14afcac17253ce7418da751ec6b1988790cdc8f"; - sha256 = "00q5qzxpn9n59nrmrljz4w9lljxvrr8i5j8i8b4iw86j0alcx53b"; - }; - } -]