From 63f079908a1de0ace8a9bb49be5b6efdad2ff3dc Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 4 Oct 2020 06:49:00 -0700 Subject: [PATCH] gh-ost: 1.0.49 -> 1.1.0 (#97139) * gh-ost: 1.0.49 -> 1.1.0 * gh-ost: add ldflags Co-authored-by: Mario Rodas --- pkgs/tools/misc/gh-ost/default.nix | 40 ++++++++++++++---------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/pkgs/tools/misc/gh-ost/default.nix b/pkgs/tools/misc/gh-ost/default.nix index 17893ef18ae..82ff74a0419 100644 --- a/pkgs/tools/misc/gh-ost/default.nix +++ b/pkgs/tools/misc/gh-ost/default.nix @@ -1,27 +1,23 @@ { stdenv, buildGoPackage, fetchFromGitHub }: -let +buildGoPackage rec { + pname = "gh-ost"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "github"; + repo = "gh-ost"; + rev = "v${version}"; + sha256 = "0laj5nmf10qn01mqn0flipmhankgvrcfbdl3bc76wa14qkkg722m"; + }; + goPackagePath = "github.com/github/gh-ost"; - version = "1.0.49"; - sha256 = "0mncjhmv25wnhgjkn9gwkz2gzh0v6954w47ql7fs2iqr9al111dq"; -in -buildGoPackage ({ - pname = "gh-ost"; - inherit version; - inherit goPackagePath; - - src = fetchFromGitHub { - owner = "github"; - repo = "gh-ost"; - rev = "v${version}"; - inherit sha256; - }; - - meta = with stdenv.lib; { - description = "Triggerless online schema migration solution for MySQL"; - homepage = "https://github.com/github/gh-ost"; - license = licenses.mit; - }; -}) + buildFlagsArray = [ "-ldflags=-s -w -X main.AppVersion=${version} -X main.BuildDescribe=${src.rev}" ]; + meta = with stdenv.lib; { + description = "Triggerless online schema migration solution for MySQL"; + homepage = "https://github.com/github/gh-ost"; + license = licenses.mit; + }; +}