From fabddcd7b6a43f47c3fcfbcd890407b31e6eaa0d Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Mon, 6 Sep 2021 19:35:06 +0200 Subject: [PATCH 1/2] age: 1.0.0-rc.3 -> 1.0.0 --- pkgs/tools/security/age/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/age/default.nix b/pkgs/tools/security/age/default.nix index 20735c6e5782..695d4a732893 100644 --- a/pkgs/tools/security/age/default.nix +++ b/pkgs/tools/security/age/default.nix @@ -2,14 +2,14 @@ buildGoModule rec { pname = "age"; - version = "1.0.0-rc.3"; - vendorSha256 = "sha256-sXUbfxhPmJXO+KgV/dmWmsyV49Pb6CoJLbt50yVgEvI="; + version = "1.0.0"; + vendorSha256 = "sha256-cnFDs5Qos1KHn7TqaEgmt4sSzpjZor615euwxka14mY="; src = fetchFromGitHub { owner = "FiloSottile"; repo = "age"; rev = "v${version}"; - sha256 = "sha256-YXdCTK9/eMvcHWg7gQQiPlLWYx2OjbOJDDNdSYO09HU="; + sha256 = "sha256-MfyW8Yv8swKqA7Hl45l5Zn4wZrQmE661eHsKIywy36U="; }; meta = with lib; { From a9fe9e8a327d0a7bd8d3ab81c21533200fa10679 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Mon, 6 Sep 2021 19:56:04 +0200 Subject: [PATCH 2/2] age: set and check version --- pkgs/tools/security/age/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/tools/security/age/default.nix b/pkgs/tools/security/age/default.nix index 695d4a732893..cff4630dd5db 100644 --- a/pkgs/tools/security/age/default.nix +++ b/pkgs/tools/security/age/default.nix @@ -12,6 +12,20 @@ buildGoModule rec { sha256 = "sha256-MfyW8Yv8swKqA7Hl45l5Zn4wZrQmE661eHsKIywy36U="; }; + ldflags = [ + "-X main.Version=${version}" + ]; + + doInstallCheck = true; + installCheckPhase = '' + if [[ "$("$out/bin/${pname}" --version)" == "${version}" ]]; then + echo '${pname} smoke check passed' + else + echo '${pname} smoke check failed' + return 1 + fi + ''; + meta = with lib; { homepage = "https://age-encryption.org/"; description = "Modern encryption tool with small explicit keys";