Skip to content

Commit

Permalink
Merge pull request conda-forge#28161 from danielnachun/go-recipes10
Browse files Browse the repository at this point in the history
add sttr, templ, thrift-ls, ticker
  • Loading branch information
xhochy authored Nov 15, 2024
2 parents 0d6ba8f + 7e604ee commit 7c6638a
Show file tree
Hide file tree
Showing 13 changed files with 227 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipes/sttr/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files ^
--ignore github.com/mattn/go-localereader ^
--ignore gitlab.com/abhimanyusharma003/go-ordered-json || goto :error

:: Manually copy licenses that go-licenses could not download
xcopy /s %RECIPE_DIR%\license-files\* %SRC_DIR%\license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
11 changes: 11 additions & 0 deletions recipes/sttr/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files \
--ignore github.com/mattn/go-localereader \
--ignore gitlab.com/abhimanyusharma003/go-ordered-json

# Manually copy licenses that go-licenses could not download
cp -r ${RECIPE_DIR}/license-files/* ${SRC_DIR}/license-files
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2022 Yasuhiro Matsumoto

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
35 changes: 35 additions & 0 deletions recipes/sttr/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "sttr" %}
{% set version = "0.2.18" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/abhimanyu003/sttr/archive/v{{ version }}.tar.gz
sha256: 89a031b02e976b4119c294723d121e31c1916b482dd367ffa6819bcab9b4c8f9

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- sttr --help

about:
home: https://github.com/abhimanyu003/sttr
license: MIT
license_file:
- LICENSE
- license-files/
summary: cross-platform, cli app to perform various operations on string
dev_url: https://github.com/abhimanyu003/sttr

extra:
recipe-maintainers:
- danielnachun
8 changes: 8 additions & 0 deletions recipes/templ/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" .\cmd\templ || goto :error
go-licenses save .\cmd\templ --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
6 changes: 6 additions & 0 deletions recipes/templ/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w" ./cmd/templ
go-licenses save ./cmd/templ --save_path=license-files
35 changes: 35 additions & 0 deletions recipes/templ/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "templ" %}
{% set version = "0.2.771" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/a-h/templ/archive/v{{ version }}.tar.gz
sha256: 4d9b352e69198ddbc0ad7abb2bde2abff7a35f4ad8723c46ac7b36af6f0a8628

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- templ --help

about:
home: https://github.com/a-h/templ
license: MIT
license_file:
- LICENSE
- license-files/
summary: A golang formatter that fixes long lines
dev_url: https://github.com/a-h/templ

extra:
recipe-maintainers:
- danielnachun
8 changes: 8 additions & 0 deletions recipes/thrift-ls/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
6 changes: 6 additions & 0 deletions recipes/thrift-ls/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files
35 changes: 35 additions & 0 deletions recipes/thrift-ls/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "thrift-ls" %}
{% set version = "0.2.0" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/joyme123/thrift-ls/archive/v{{ version }}.tar.gz
sha256: 7906902c140860f79851a0b8cb92afbc3b14ee2a3726d5fbad3e8333bea1219b

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- thrift-ls --help

about:
home: https://github.com/joyme123/thrift-ls
license: Apache-2.0
license_file:
- LICENSE
- license-files/
summary: Thrift Language Server
dev_url: https://github.com/joyme123/thrift-ls

extra:
recipe-maintainers:
- danielnachun
8 changes: 8 additions & 0 deletions recipes/ticker/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
go build -buildmode=pie -trimpath -o=%LIBRARY_PREFIX%\bin\%PKG_NAME%.exe -ldflags="-s" || goto :error
go-licenses save . --save_path=license-files --ignore=github.com/achannarasappa/ticker || goto :error

goto :EOF

:error
echo Failed with error #%errorlevel%.
exit 1
6 changes: 6 additions & 0 deletions recipes/ticker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash

set -o xtrace -o nounset -o pipefail -o errexit

go build -buildmode=pie -trimpath -o=${PREFIX}/bin/${PKG_NAME} -ldflags="-s -w"
go-licenses save . --save_path=license-files --ignore=github.com/achannarasappa/ticker
35 changes: 35 additions & 0 deletions recipes/ticker/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{% set name = "ticker" %}
{% set version = "4.5.14" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/achannarasappa/ticker/archive/v{{ version }}.tar.gz
sha256: d95e286a2ecda18154e24b1b8a05b6e3bff9cc48d2a127217ba7ec7379e4c163

build:
number: 0

requirements:
build:
- {{ compiler('go-nocgo') }}
- go-licenses

test:
commands:
- ticker --help

about:
home: https://github.com/achannarasappa/ticker
license: MIT
license_file:
- LICENSE
- license-files/
summary: Terminal stock ticker with live updates and position tracking
dev_url: https://github.com/achannarasappa/ticker

extra:
recipe-maintainers:
- danielnachun

0 comments on commit 7c6638a

Please sign in to comment.