1 { lib, stdenv, stdenv_32bit, pkgsi686Linux, fetchFromGitHub, fetchurl }:
3 stdenv.mkDerivation rec {
6 src = fetchFromGitHub {
7 rev = "755eb943ccea9e78c2cab0f20b313a52404355cb";
10 sha256 = "sha256:045rrg9666zczgrwyyyglivzdzja103s52b0fzj7hqmr1fz68q37";
14 url = "http://www.rebol.com/downloads/v278/rebol-core-278-4-2.tar.gz";
15 sha256 = "1c1v0pyhf3d8z98qc93a5zmx0bbl0qq5lr8mbkdgygqsq2bv2xbz";
18 buildInputs = [ pkgsi686Linux.curl stdenv_32bit ];
20 r2 = "./rebol/releases/rebol-core/rebol";
25 tar -xzvf ${rebol} -C rebol/
26 patchelf --set-interpreter \
27 ${stdenv_32bit.cc.libc.out}/lib/32/ld-linux.so.2 \
36 ${r2} -qw red.r tests/hello.red
38 # Compiling the Red console...
39 ${r2} -qw red.r -r environment/console/CLI/console.red
43 ../${r2} -qw makedoc2.r red-system-specs.txt
44 ../${r2} -qw makedoc2.r red-system-quick-test.txt
52 install -d $out/opt/red
53 find quick-test -type f -executable -print0 | xargs -0 rm
55 rm -rf $out/opt/red/rebol
56 install -Dm755 console $out/bin/red
57 install -Dm644 BSD-3-License.txt \
58 $out/share/licenses/${pname}-${version}/BSD-3-License.txt
59 install -Dm644 BSL-License.txt \
60 $out/share/licenses/${pname}-${version}/BSL-License.txt
61 install -Dm644 docs/red-system-quick-test.html \
62 $out/share/doc/${pname}-${version}/red-system-quick-test.html
63 install -Dm644 docs/red-system-specs.html \
64 $out/share/doc/${pname}-${version}/red-system-specs.html
67 patchelf --set-interpreter \
68 ${stdenv_32bit.cc.libc.out}/lib/32/ld-linux.so.2 \
70 patchelf --set-rpath ${pkgsi686Linux.curl.out}/lib \
72 patchelf --set-interpreter \
73 ${stdenv_32bit.cc.libc.out}/lib/32/ld-linux.so.2 \
75 patchelf --set-rpath ${pkgsi686Linux.curl.out}/lib \
82 New programming language strongly inspired by Rebol, but with a
83 broader field of usage thanks to its native-code compiler, from system
84 programming to high-level scripting, while providing modern support for
85 concurrency and multi-core CPUs
87 maintainers = with maintainers; [ uralbash ];
88 platforms = [ "i686-linux" "x86_64-linux" ];
89 license = licenses.bsd3;
90 homepage = "https://www.red-lang.org/";