From fdf236a789f94c4a2148ce6b4131559f1030b94d Mon Sep 17 00:00:00 2001 From: "Vargas, Dan" Date: Wed, 17 Mar 2021 12:35:16 -0500 Subject: [PATCH] pkg(haskell-9.0.1): Add haskell 9.0.1 --- packages/haskell/9.0.1/build.sh | 19 +++++++++++++++++++ packages/haskell/9.0.1/compile | 5 +++++ packages/haskell/9.0.1/environment | 1 + packages/haskell/9.0.1/metadata.json | 6 ++++++ packages/haskell/9.0.1/run | 4 ++++ packages/haskell/9.0.1/test.hs | 1 + 6 files changed, 36 insertions(+) create mode 100755 packages/haskell/9.0.1/build.sh create mode 100644 packages/haskell/9.0.1/compile create mode 100644 packages/haskell/9.0.1/environment create mode 100644 packages/haskell/9.0.1/metadata.json create mode 100644 packages/haskell/9.0.1/run create mode 100644 packages/haskell/9.0.1/test.hs diff --git a/packages/haskell/9.0.1/build.sh b/packages/haskell/9.0.1/build.sh new file mode 100755 index 0000000..50d63c2 --- /dev/null +++ b/packages/haskell/9.0.1/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +PREFIX=$(realpath $(dirname $0)) + +mkdir -p build + +cd build + +# Platform specific because a true source compile would require GHC to be installed already on the latest +curl -L "https://downloads.haskell.org/~ghc/9.0.1/ghc-9.0.1-x86_64-deb10-linux.tar.xz" -o ghc.tar.xz +tar xf ghc.tar.xz --strip-components=1 +rm ghc.tar.xz + +./configure --prefix="$PREFIX" +make install -j$(nproc) + +cd ../ + +rm -rf build diff --git a/packages/haskell/9.0.1/compile b/packages/haskell/9.0.1/compile new file mode 100644 index 0000000..2dd42e9 --- /dev/null +++ b/packages/haskell/9.0.1/compile @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +# Compile haskell file(s) +ghc -dynamic -v0 -o out "$@" +chmod +x out diff --git a/packages/haskell/9.0.1/environment b/packages/haskell/9.0.1/environment new file mode 100644 index 0000000..bd0ff98 --- /dev/null +++ b/packages/haskell/9.0.1/environment @@ -0,0 +1 @@ +export PATH=$PWD/bin:$PATH \ No newline at end of file diff --git a/packages/haskell/9.0.1/metadata.json b/packages/haskell/9.0.1/metadata.json new file mode 100644 index 0000000..c6fae6d --- /dev/null +++ b/packages/haskell/9.0.1/metadata.json @@ -0,0 +1,6 @@ +{ + "language": "haskell", + "version": "9.0.1", + "author": "Dan Vargas ", + "aliases": ["haskell", "hs"] +} \ No newline at end of file diff --git a/packages/haskell/9.0.1/run b/packages/haskell/9.0.1/run new file mode 100644 index 0000000..6955ba9 --- /dev/null +++ b/packages/haskell/9.0.1/run @@ -0,0 +1,4 @@ +#!/bin/bash + +shift # Filename is only used to compile +./out "$@" diff --git a/packages/haskell/9.0.1/test.hs b/packages/haskell/9.0.1/test.hs new file mode 100644 index 0000000..a8dd75a --- /dev/null +++ b/packages/haskell/9.0.1/test.hs @@ -0,0 +1 @@ +main = putStrLn "OK" \ No newline at end of file