mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-23 21:46:27 +02:00
Initial nix ad-hoc package installation
This commit is contained in:
parent
10183d0638
commit
8e230befce
3 changed files with 32 additions and 40 deletions
|
@ -1,27 +1,24 @@
|
|||
{pkgs, piston, ...}:
|
||||
let
|
||||
pkg = pkgs.python3;
|
||||
in piston.mkRuntime {
|
||||
{ pkgs, piston, ... }:
|
||||
let basePkg = pkgs.python3;
|
||||
in piston.mkRuntime (libraries:
|
||||
let pkg = basePkg.withPackages libraries;
|
||||
in {
|
||||
language = "python3";
|
||||
version = pkg.version;
|
||||
version = basePkg.version;
|
||||
|
||||
aliases = [
|
||||
"py3"
|
||||
"py"
|
||||
"python"
|
||||
];
|
||||
aliases = [ "py3" "py" "python" ];
|
||||
|
||||
run = ''
|
||||
${pkg}/bin/python3 "$@"
|
||||
${pkg}/bin/python3 "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.py" = ''
|
||||
print("OK")
|
||||
'';
|
||||
};
|
||||
})
|
||||
(piston.mkTest {
|
||||
files = {
|
||||
"test.py" = ''
|
||||
print("OK")
|
||||
'';
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue