migrate ponylang to nix

This commit is contained in:
Dan Vargas 2022-02-06 21:06:32 -07:00
parent a8adca3e18
commit dc2c5f3380
8 changed files with 38 additions and 50 deletions

View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
PREFIX=$(realpath $(dirname $0))
# get sources - only get the latest copy of the relevant files
git clone -q https://github.com/ponylang/ponyc.git ponyc
cd ponyc
# release commit for 0.39.0
git reset --hard 85d897b978c5082a1f3264a3a9ad479446d73984
# updates all submodules recursively along their tracking branches
# i.e. https://github.com/ponylang/ponyc/blob/main/.gitmodules
git submodule update --recursive --init
# Build the vendored LLVM libraries that are included in the `lib/llvm/src`.
make libs build_flags="-j$(nproc)"
# Configure the CMake build directory.
make configure
# Will build pony and put it in `build/release`.
make build
# Install pony into `$PREFIX`.
make prefix="$PREFIX" install
cd ..
rm -rf ponyc

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Compile pony file(s)
rename 's/$/\.pony/' "$@" # Add .pony extension
ponyc -b out

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "ponylang",
"version": "0.39.0",
"aliases": ["pony", "ponyc"]
}

View file

@ -1,6 +0,0 @@
#!/bin/bash
# removes the first arg from $@, which is always the filename
shift
# runs the <outfile> executable with whatever args are left in $@
./out "$@"

View file

@ -1,3 +0,0 @@
actor Main
new create(env: Env) =>
env.out.print("OK")