move prolog to nix

This commit is contained in:
Dan Vargas 2022-02-06 20:55:36 -07:00
parent b94e99ac09
commit a8adca3e18
7 changed files with 30 additions and 33 deletions

29
runtimes/prolog.nix Normal file
View file

@ -0,0 +1,29 @@
{pkgs, piston, ...}:
let
pkg = pkgs.swiProlog;
in piston.mkRuntime {
language = "prolog";
version = pkg.version;
aliases = [
"plg"
];
run = ''
${pkg}/bin/swipl -g true -t halt "$@"
'';
tests = [
(piston.mkTest {
files = {
"test.pl" = ''
:- write('OK'), nl.
'';
};
args = [];
stdin = "";
packages = [];
main = "test.pl";
})
];
}