From ed90d40fd1268325109db51da2ba05ea778a5c22 Mon Sep 17 00:00:00 2001 From: John Allen Date: Sat, 14 Jan 2023 13:21:42 -0500 Subject: [PATCH] +fzf (#104) * +fzf This only includes building the `fzf` binary. It does not include shell keybindings or completions. * fix provided binary name --- projects/github.com/junegunn/fzf/data.txt | 2 ++ projects/github.com/junegunn/fzf/package.yml | 33 ++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 projects/github.com/junegunn/fzf/data.txt create mode 100644 projects/github.com/junegunn/fzf/package.yml diff --git a/projects/github.com/junegunn/fzf/data.txt b/projects/github.com/junegunn/fzf/data.txt new file mode 100644 index 00000000..94954abd --- /dev/null +++ b/projects/github.com/junegunn/fzf/data.txt @@ -0,0 +1,2 @@ +hello +world diff --git a/projects/github.com/junegunn/fzf/package.yml b/projects/github.com/junegunn/fzf/package.yml new file mode 100644 index 00000000..d16f3ac0 --- /dev/null +++ b/projects/github.com/junegunn/fzf/package.yml @@ -0,0 +1,33 @@ +distributable: + url: https://github.com/junegunn/fzf/archive/refs/tags/{{version}}.tar.gz + strip-components: 1 + +versions: + github: junegunn/fzf + +provides: + - bin/fzf + +build: + script: | + go build -v -ldflags="$LDFLAGS" + mkdir -p "{{ prefix }}"/bin + mv fzf "{{ prefix }}"/bin + dependencies: + go.dev: ^1.18 + env: + LDFLAGS: + - -s + - -w + - -X main.version={{ version }} + - -X main.revision=tea + linux: + # or segmentation fault + # fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575 + LDFLAGS: + - -buildmode=pie + +test: + script: | + out=$(cat data.txt | fzf -f wld) + test "$out" = "world"