From 2a3c28331899cd76e5afc223e1a0ebf85a422c44 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 27 Feb 2022 14:38:05 +0100 Subject: fast-cli: go version --- overlays/fast-cli.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 overlays/fast-cli.nix diff --git a/overlays/fast-cli.nix b/overlays/fast-cli.nix new file mode 100644 index 00000000..314d3796 --- /dev/null +++ b/overlays/fast-cli.nix @@ -0,0 +1,40 @@ +final: prev: { + fast-cli = prev.buildGoModule rec { + pname = "fast-cli"; + version = "0.2.10"; + + src = prev.fetchFromGitHub { + owner = "gesquive"; + repo = pname; + rev = "v${version}"; + hash = "sha256-j7/3Llc3jTeJGpOH3Aexm9qcNscuk0mbi4ZCCyzC3+s="; + }; + vendorSha256 = "sha256-XM/5kUau0JBMxN0UpX6QNI31i8/+HNFvgFUFtlJsBh0="; + + preBuild = let + goMod = prev.writeText "go.mod" '' + module github.com/gesquive/fast-cli + + go 1.17 + + require ( + github.com/dustin/go-humanize v0.0.0-20170228161531-259d2a102b87 + github.com/fatih/color v1.4.1 + github.com/gesquive/cli v0.2.0 + github.com/inconshreveable/mousetrap v1.0.0 + github.com/mattn/go-colorable v0.0.8-0.20170210172801-5411d3eea597 + github.com/mattn/go-isatty v0.0.2-0.20170307163044-57fdcb988a5c + github.com/spf13/cobra v0.0.0-20170531045452-8d4ce3549a0b + github.com/spf13/pflag v1.0.0 + golang.org/x/sys v0.0.0-20170213225739-e24f485414ae + ) + ''; + in '' + install -v -m 0644 ${goMod} ./go.mod + ''; + + ldflags = [ + "-X main.version=${version}" + ]; + }; +} -- cgit v1.2.3