mirror of
https://github.com/engineer-man/piston.git
synced 2025-05-15 16:16:28 +02:00
Convert some packages to nix-based
Affected packages: - crystal - dart - dash - deno - elixir - erlang - gawk
This commit is contained in:
parent
ddab59ccdd
commit
af5036d82c
60 changed files with 224 additions and 309 deletions
31
runtimes/crystal.nix
Normal file
31
runtimes/crystal.nix
Normal 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")
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue