Convert some packages to nix-based

Affected packages:
- crystal
- dart
- dash
- deno
- elixir
- erlang
- gawk
This commit is contained in:
Thomas Hobson 2022-01-31 18:02:35 +13:00
parent ddab59ccdd
commit af5036d82c
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
60 changed files with 224 additions and 309 deletions

31
runtimes/crystal.nix Normal file
View file

@ -0,0 +1,31 @@
{pkgs, piston, ...}:
let
pkg = pkgs.crystal;
in piston.mkRuntime {
language = "crystal";
version = pkg.version;
aliases = [
"cr"
];
compile = ''
${pkg}/bin/crystal build "$@" -o out --no-color
chmod +x out
'';
run = ''
shift
./out "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.cr" = ''
puts("OK")
'';
};
})
];
}