add perl-rename to container and update related runtime scripts
This commit is contained in:
parent
35cd527c69
commit
9cbec53580
|
@ -40,6 +40,7 @@ with pkgs; rec {
|
|||
gnutar
|
||||
gzip
|
||||
gnugrep
|
||||
rename
|
||||
util-linux
|
||||
];
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@ in piston.mkRuntime {
|
|||
export TMPDIR="$PWD"
|
||||
|
||||
# modify file extension
|
||||
mv "$1" "$1.v"
|
||||
filename="$1.v"
|
||||
filename="$1"
|
||||
rename 's/$/.v/' "$filename"
|
||||
shift
|
||||
|
||||
${pkg}/bin/v run "$filename" "$@"
|
||||
${pkg}/bin/v run "$filename.v" "$@"
|
||||
'';
|
||||
|
||||
tests = [
|
||||
|
|
|
@ -8,7 +8,7 @@ in piston.mkRuntime {
|
|||
|
||||
# Add .zig extension for compile script and optimize compiler for small programs
|
||||
compile = ''
|
||||
for f; do mv "$f" "$f.zig"; done
|
||||
rename 's/$/.zig/' "$@"
|
||||
${pkg}/bin/zig build-exe -O ReleaseSafe --color off --cache-dir . --global-cache-dir . --name out *.zig
|
||||
'';
|
||||
|
||||
|
|
Loading…
Reference in New Issue