pkg(husk-1.0.0): add husk

This commit is contained in:
Hydrazer 2021-10-08 17:14:08 -06:00
parent 2ae63a4d69
commit 7ff87cf0f2
6 changed files with 37 additions and 0 deletions

14
packages/husk/1.0.0/build.sh vendored Normal file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
cp ../../haskell/9.0.1/build.sh ./haskell-build.sh
sed -Ei 's/9\.0\.1/8\.10\.7/g' ./haskell-build.sh
source ./haskell-build.sh
# compile Husk from source
git clone -q "https://github.com/barbuz/husk.git"
cd husk
../bin/ghc -O2 Husk
# cleanup
cd ..
rm -f haskell-build.sh

6
packages/husk/1.0.0/environment vendored Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
# haskell and husk path
export PATH=$PWD/bin:$PATH
export HUSK_PATH=$PWD/husk
export LANG=en_US.UTF8

5
packages/husk/1.0.0/metadata.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"language": "husk",
"version": "1.0.0",
"aliases": []
}

10
packages/husk/1.0.0/run vendored Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Store the current path because we'll need it to run the program file
PROGRAM_PATH=$PWD
# For now, Husk can only be run within the folder that has the imported modules
cd $HUSK_PATH
# Run Husk from file in unicode format with the given args
./Husk -uf "${PROGRAM_PATH}/${@}"

1
packages/husk/1.0.0/test.husk vendored Normal file
View File

@ -0,0 +1 @@
"OK

View File

@ -348,6 +348,7 @@ Content-Type: application/json
`golfscript`,
`groovy`,
`haskell`,
`husk`,
`iverilog`,
`japt`,
`java`,