uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
43
pkgs/development/compilers/opendylan/bin.nix
Normal file
43
pkgs/development/compilers/opendylan/bin.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Binaries provided by Open Dylan to be used to bootstrap from source.
|
||||
# The binaries can also be used as is.
|
||||
{lib, stdenv, fetchurl, patchelf, boehmgc, gcc, makeWrapper}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "opendylan";
|
||||
version = "2013.2";
|
||||
|
||||
src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
|
||||
url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86_64-linux.tar.bz2";
|
||||
sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
|
||||
}
|
||||
else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
|
||||
url = "https://opendylan.org/downloads/opendylan/${version}/opendylan-${version}-x86-linux.tar.bz2";
|
||||
sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
|
||||
}
|
||||
else throw "platform ${stdenv.hostPlatform.system} not supported.";
|
||||
|
||||
nativeBuildInputs = [ patchelf boehmgc makeWrapper ];
|
||||
|
||||
buildCommand = ''
|
||||
mkdir -p "$out"
|
||||
tar --strip-components=1 -xjf "$src" -C "$out"
|
||||
|
||||
interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
|
||||
for a in "$out"/bin/*; do
|
||||
patchelf --set-interpreter "$interpreter" "$a"
|
||||
patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
|
||||
done
|
||||
for a in "$out"/lib/*.so; do
|
||||
patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
|
||||
done
|
||||
sed -i -e "s|\-lgc|\-L${boehmgc.out}\/lib -lgc|" $out/lib/config.jam
|
||||
wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = "https://opendylan.org";
|
||||
description = "A multi-paradigm functional and object-oriented programming language";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
42
pkgs/development/compilers/opendylan/default.nix
Normal file
42
pkgs/development/compilers/opendylan/default.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# Build Open Dylan from source using the binary builds to bootstrap.
|
||||
{lib, stdenv, fetchFromGitHub, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "opendylan";
|
||||
version = "2016.1pre";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dylan-lang";
|
||||
repo = "opendylan";
|
||||
rev = "cd9a8395586d33cc43a8611c1dc0513e69ee82dd";
|
||||
sha256 = "sha256-i1wr4mBUbZhL8ENFGz8gV/mMzSJsj1AdJLd4WU9tIQM=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
|
||||
opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
|
||||
];
|
||||
|
||||
preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
|
||||
mkdir -p $TMPDIR/mps
|
||||
tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
|
||||
./autogen.sh
|
||||
''
|
||||
else ''
|
||||
./autogen.sh
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
(if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
|
||||
];
|
||||
buildPhase = "make 3-stage-bootstrap";
|
||||
|
||||
postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";
|
||||
|
||||
meta = {
|
||||
homepage = "https://opendylan.org";
|
||||
description = "A multi-paradigm functional and object-oriented programming language";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue