From 827f4df4eb1e8047b5a2ccb6d35bd8934b9b35a8 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 5 Sep 2021 00:54:05 +0200 Subject: [PATCH] checkmate: init at 0.4.1 --- pkgs/tools/networking/checkip/default.nix | 33 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/tools/networking/checkip/default.nix diff --git a/pkgs/tools/networking/checkip/default.nix b/pkgs/tools/networking/checkip/default.nix new file mode 100644 index 000000000000..b379a1725de9 --- /dev/null +++ b/pkgs/tools/networking/checkip/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "checkip"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "jreisinger"; + repo = pname; + rev = "v${version}"; + sha256 = "065426z4iak72h56qvp1vk86r2vw5rdqy3qi1zbw1l0hnyq83zwq"; + }; + + vendorSha256 = "10hk2wfkpvnavs20q390qgaj1gj10j1fy8vlqb9s9f76gpb130h4"; + + postFixup = '' + # Rename binary + mv $out/bin/cmd $out/bin/${pname} + ''; + + # Requires network + doCheck = false; + + meta = with lib; { + description = "CLI tool that checks an IP address using various public services"; + homepage = "https://github.com/jreisinger/checkip"; + license = licenses.asl20; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cd2f731315d5..4fb5a96c603f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1296,6 +1296,8 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; + checkip = callPackage ../tools/networking/checkip { }; + ec2_api_tools = callPackage ../tools/virtualization/ec2-api-tools { }; ec2_ami_tools = callPackage ../tools/virtualization/ec2-ami-tools { };