Convert some packages to nix-based

Affected packages:
- crystal
- dart
- dash
- deno
- elixir
- erlang
- gawk
This commit is contained in:
Thomas Hobson 2022-01-31 18:02:35 +13:00
parent ddab59ccdd
commit af5036d82c
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
60 changed files with 224 additions and 309 deletions

View file

@ -1,7 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
curl -L "https://github.com/crystal-lang/crystal/releases/download/0.36.1/crystal-0.36.1-1-linux-x86_64.tar.gz" -o crystal.tar.gz
tar xzf crystal.tar.gz --strip-components=1
rm crystal.tar.gz

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Compile crystal files into out file
crystal build "$@" -o out --no-color && \
chmod +x out

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "crystal",
"version": "0.36.1",
"aliases": ["crystal", "cr"]
}

View file

@ -1,4 +0,0 @@
#!/bin/bash
shift # Filename is only used to compile
./out "$@"

View file

@ -1 +0,0 @@
puts("OK")

View file

@ -1,11 +0,0 @@
#!/usr/bin/env bash
curl -L "https://storage.googleapis.com/dart-archive/channels/stable/release/2.12.1/sdk/dartsdk-linux-x64-release.zip" -o dart.zip
unzip dart.zip
rm dart.zip
cp -r dart-sdk/* .
rm -rf dart-sdk
chmod -R +rx bin

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": "dart",
"version": "2.12.1",
"aliases": []
}

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
dart run "$@"

View file

@ -1,3 +0,0 @@
void main() {
print('OK');
}

View file

@ -1,19 +0,0 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "http://gondor.apana.org.au/~herbert/dash/files/dash-0.5.11.tar.gz" -o dash.tar.gz
tar xzf dash.tar.gz --strip-components=1
./configure --prefix "$PREFIX" &&
make -j$(nproc) &&
make install -j$(nproc)
cd ../
rm -rf build

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": "dash",
"version": "0.5.11",
"aliases": ["dash"]
}

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
dash "$@"

View file

@ -1 +0,0 @@
echo "OK"

View file

@ -1,5 +0,0 @@
#!/bin/bash
curl -OL https://github.com/denoland/deno/releases/download/v1.16.2/deno-x86_64-unknown-linux-gnu.zip
unzip -o deno-x86_64-unknown-linux-gnu.zip
rm deno-x86_64-unknown-linux-gnu.zip

View file

@ -1,3 +0,0 @@
#!/bin/bash
export PATH=$PWD:$PATH

View file

@ -1,20 +0,0 @@
{
"language": "deno",
"version": "1.16.2",
"dependencies": {},
"provides": [
{
"language": "typescript",
"aliases": [
"deno",
"deno-ts"
]
},
{
"language": "javascript",
"aliases": [
"deno-js"
]
}
]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
DENO_DIR=$PWD deno run $@

View file

@ -1 +0,0 @@
console.log("OK")

View file

@ -1,5 +0,0 @@
curl -L https://github.com/denoland/deno/releases/download/v1.7.5/deno-x86_64-unknown-linux-gnu.zip --output deno.zip
unzip -o deno.zip
rm deno.zip
chmod +x deno

View file

@ -1 +0,0 @@
export PATH=$PWD:$PATH

View file

@ -1,14 +0,0 @@
{
"language": "deno",
"version": "1.7.5",
"provides": [
{
"language": "typescript",
"aliases": ["deno-ts", "deno"]
},
{
"language": "javascript",
"aliases": ["deno-js"]
}
]
}

View file

@ -1,2 +0,0 @@
#!/bin/bash
DENO_DIR=$PWD deno run "$@"

View file

@ -1 +0,0 @@
console.log('OK');

View file

@ -1,25 +0,0 @@
#!/bin/bash
source ../../erlang/23.0.0/build.sh
export PATH=$PWD/bin:$PATH
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl -L "https://github.com/elixir-lang/elixir/archive/v1.11.3.tar.gz" -o elixir.tar.gz
tar xzf elixir.tar.gz --strip-components=1
rm elixir.tar.gz
./configure --prefix "$PREFIX"
make -j$(nproc)
cd ..
cp -r build/bin .
cp -r build/lib .
rm -rf build

View file

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# Put 'export' statements here for environment variables
export LC_ALL=en_US.UTF-8
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "elixir",
"version": "1.11.3",
"aliases": ["elixir", "exs"]
}

View file

@ -1,4 +0,0 @@
#!/bin/bash
# Put instructions to run the runtime
elixir "$@"

View file

@ -1 +0,0 @@
IO.puts("OK")

View file

@ -1,21 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "http://erlang.org/download/otp_src_23.0.tar.gz" -o erlang.tar.gz
tar xzf erlang.tar.gz --strip-components=1
rm erlang.tar.gz
export ERL_TOP=$(pwd)
./configure --prefix "$PREFIX"
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build

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": "erlang",
"version": "23.0.0",
"aliases": ["erlang", "erl", "escript"]
}

View file

@ -1,4 +0,0 @@
#!/bin/bash
# Put instructions to run the runtime
escript "$@"

View file

@ -1,3 +0,0 @@
main(_) ->
io:format("OK~n").

View file

@ -1,3 +0,0 @@
#!/bin/bash
# Nothing to do here

View file

@ -1,3 +0,0 @@
#!/bin/bash
export PATH=$PWD:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "file",
"version": "0.0.1",
"aliases": ["executable", "elf", "binary"]
}

View file

@ -1,6 +0,0 @@
#!/bin/bash
filename="$1"
chmod +x "$filename"
shift
./"$filename" "$@"

Binary file not shown.

View file

@ -1,21 +0,0 @@
#!/usr/bin/env bash
# Put instructions to build your package in here
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://ftp.gnu.org/gnu/gawk/gawk-5.1.0.tar.gz" -o gawk.tar.gz
tar xzf gawk.tar.gz --strip-components=1
# === autoconf based ===
./configure --prefix "$PREFIX"
make -j$(nproc)
make install -j$(nproc)
cd ../
rm -rf build

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,10 +0,0 @@
{
"language": "gawk",
"version": "5.1.0",
"provides": [
{
"language": "awk",
"aliases": ["gawk"]
}
]
}

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# Put instructions to run the runtime
gawk-5.1.0 -f "$@"

View file

@ -1 +0,0 @@
{print "OK"}

View file

@ -1,21 +0,0 @@
#!/bin/bash
PREFIX=$(realpath $(dirname $0))
mkdir -p build
cd build
curl "https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz" -o python.tar.gz
tar xzf python.tar.gz --strip-components=1
rm python.tar.gz
./configure --prefix "$PREFIX" --with-ensurepip=install
make -j$(nproc)
make install -j$(nproc)
cd ..
rm -rf build
bin/pip3 install numpy scipy pandas pycrypto whoosh bcrypt passlib sympy

View file

@ -1 +0,0 @@
export PATH=$PWD/bin:$PATH

View file

@ -1,5 +0,0 @@
{
"language": "python",
"version": "3.10.0",
"aliases": ["py", "py3", "python3", "python3.10"]
}

View file

@ -1,3 +0,0 @@
#!/bin/bash
python3.10 "$@"

View file

@ -1,7 +0,0 @@
working = True
match working:
case True:
print("OK")
case False:
print()