mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
migrate nim pkg to nix
This commit is contained in:
parent
f94ba284df
commit
ab536f35ff
8 changed files with 33 additions and 34 deletions
|
@ -30,4 +30,5 @@ args: {
|
|||
"perl" = import ./perl.nix args;
|
||||
"octave" = import ./octave.nix args;
|
||||
"ocaml" = import ./ocaml.nix args;
|
||||
"nim" = import ./nim.nix args;
|
||||
}
|
||||
|
|
32
runtimes/nim.nix
Normal file
32
runtimes/nim.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.nim;
|
||||
in piston.mkRuntime {
|
||||
language = "nim";
|
||||
version = pkg.version;
|
||||
aliases = [];
|
||||
|
||||
compile = ''
|
||||
${pkg}/bin/nim --hints:off --out:out --nimcache:./ c "$@"
|
||||
chmod +x out
|
||||
'';
|
||||
|
||||
run = ''
|
||||
shift
|
||||
./out "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.nim" = ''
|
||||
echo("OK")
|
||||
'';
|
||||
};
|
||||
args = [];
|
||||
stdin = "";
|
||||
packages = [];
|
||||
main = "test.nim";
|
||||
})
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue