pantry/projects/elixir-lang.org/package.yml

41 lines
739 B
YAML
Raw Normal View History

2023-04-26 06:32:55 +03:00
distributable:
url: https://github.com/elixir-lang/elixir/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: elixir-lang/elixir
strip: /v/
dependencies:
erlang.org: '*'
2023-04-26 06:32:55 +03:00
2023-12-22 20:04:59 +03:00
build: make install PREFIX="{{prefix}}"
2023-04-26 06:32:55 +03:00
provides:
- bin/elixir
- bin/elixirc
- bin/iex
- bin/mix
test:
script: |
elixir --version
mkdir test
cp $FIXTURE test/test.exs
cd test
elixir test.exs
fixture: |
whichfizz = fn
(0, 0, _) -> "FizzBuzz"
(0, _, _) -> "Fizz"
(_, 0, _) -> "Buzz"
(_, _, n) -> n
end
fizzbuzz = fn (n) ->
whichfizz.(rem(n, 3), rem(n, 5), n)
end
[1, 2, "Fizz", 4, "Buzz", "Fizz", 7, 8, "Fizz", "Buzz"] = Enum.map(1..10, fizzbuzz)