nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 43 lines 1.7 kB view raw
1# Binaries provided by Open Dylan to be used to bootstrap from source. 2# The binaries can also be used as is. 3{lib, stdenv, fetchurl, patchelf, boehmgc, gcc, makeWrapper}: 4 5stdenv.mkDerivation rec { 6 pname = "opendylan"; 7 version = "2013.2"; 8 9 src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { 10 url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86_64-linux.tar.bz2"; 11 sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h"; 12 } 13 else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { 14 url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86-linux.tar.bz2"; 15 sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5"; 16 } 17 else throw "platform ${stdenv.hostPlatform.system} not supported."; 18 19 nativeBuildInputs = [ patchelf boehmgc makeWrapper ]; 20 21 buildCommand = '' 22 mkdir -p "$out" 23 tar --strip-components=1 -xjf "$src" -C "$out" 24 25 interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)" 26 for a in "$out"/bin/*; do 27 patchelf --set-interpreter "$interpreter" "$a" 28 patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a" 29 done 30 for a in "$out"/lib/*.so; do 31 patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a" 32 done 33 sed -i -e "s|\-lgc|\-L${boehmgc.out}\/lib -lgc|" $out/lib/config.jam 34 wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin 35 ''; 36 37 meta = { 38 homepage = "https://opendylan.org"; 39 description = "A multi-paradigm functional and object-oriented programming language"; 40 license = lib.licenses.mit; 41 platforms = lib.platforms.linux; 42 }; 43}