2014-05-27 04:28:09 +02:00
|
|
|
# Binaries provided by Open Dylan to be used to bootstrap from source.
|
|
|
|
# The binaries can also be used as is.
|
2021-01-22 12:25:31 +01:00
|
|
|
{lib, stdenv, fetchurl, patchelf, boehmgc, gnused, gcc, makeWrapper}:
|
2014-05-27 04:28:09 +02:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
name = "opendylan-2013.2";
|
|
|
|
|
2018-08-20 21:11:29 +02:00
|
|
|
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2";
|
2014-05-27 04:28:09 +02:00
|
|
|
sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
|
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
|
2020-04-01 03:11:51 +02:00
|
|
|
url = "https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2";
|
2014-05-27 04:28:09 +02:00
|
|
|
sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
|
|
|
|
}
|
2018-08-20 21:11:29 +02:00
|
|
|
else throw "platform ${stdenv.hostPlatform.system} not supported.";
|
2014-05-27 04:28:09 +02:00
|
|
|
|
2018-09-27 23:38:10 +02:00
|
|
|
nativeBuildInputs = [ patchelf boehmgc gnused makeWrapper ];
|
2014-05-27 04:28:09 +02:00
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p "$out"
|
|
|
|
tar --strip-components=1 -xjf "$src" -C "$out"
|
|
|
|
|
2014-12-17 19:11:30 +01:00
|
|
|
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
|
2021-01-21 01:55:55 +01:00
|
|
|
for a in "$out"/bin/*; do
|
2014-05-27 04:28:09 +02:00
|
|
|
patchelf --set-interpreter "$interpreter" "$a"
|
2016-01-24 08:29:00 +01:00
|
|
|
patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
|
2014-05-27 04:28:09 +02:00
|
|
|
done
|
2021-01-21 01:55:55 +01:00
|
|
|
for a in "$out"/lib/*.so; do
|
2016-01-24 08:29:00 +01:00
|
|
|
patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
|
2014-05-27 04:28:09 +02:00
|
|
|
done
|
2016-04-16 18:45:34 +02:00
|
|
|
sed -i -e "s|\-lgc|\-L${boehmgc.out}\/lib -lgc|" $out/lib/config.jam
|
2014-05-27 04:28:09 +02:00
|
|
|
wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://opendylan.org";
|
2014-11-11 14:20:43 +01:00
|
|
|
description = "A multi-paradigm functional and object-oriented programming language";
|
2021-01-22 12:25:31 +01:00
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.linux;
|
2014-05-27 04:28:09 +02:00
|
|
|
};
|
|
|
|
}
|