2014-10-12 08:37:57 +00:00
|
|
|
{ lib, stdenv, fetchurl, makeWrapper,
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 08:23:57 +00:00
|
|
|
libllvm, gmp, mpfr, readline, bison, flex }:
|
2011-04-08 08:00:55 +00:00
|
|
|
|
2014-10-12 08:37:57 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
baseName="pure";
|
2018-04-14 04:25:45 +00:00
|
|
|
version="0.68";
|
2014-10-12 08:37:57 +00:00
|
|
|
name="${baseName}-${version}";
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-04-14 04:25:45 +00:00
|
|
|
url="https://github.com/agraef/pure-lang/releases/download/${name}/${name}.tar.gz";
|
|
|
|
sha256="0px6x5ivcdbbp2pz5n1r1cwg1syadklhjw8piqhl63n91i4r7iyb";
|
2011-04-08 08:00:55 +00:00
|
|
|
};
|
|
|
|
|
2021-02-07 09:17:39 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
buildInputs = [ bison flex ];
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 08:23:57 +00:00
|
|
|
propagatedBuildInputs = [ libllvm gmp mpfr readline ];
|
2019-10-30 11:34:47 +00:00
|
|
|
NIX_LDFLAGS = "-lLLVMJIT";
|
2013-02-17 09:59:43 +00:00
|
|
|
|
2015-07-09 11:52:26 +00:00
|
|
|
postPatch = ''
|
|
|
|
for f in expr.cc matcher.cc printer.cc symtable.cc parserdefs.hh; do
|
|
|
|
sed -i '1i\#include <stddef.h>' $f
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2014-10-23 12:30:27 +00:00
|
|
|
configureFlags = [ "--enable-release" ];
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = ''
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 08:23:57 +00:00
|
|
|
LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}${libllvm}/lib make check
|
2014-10-23 12:30:27 +00:00
|
|
|
'';
|
2014-10-12 08:37:57 +00:00
|
|
|
postInstall = ''
|
llvmPackages: Multuple outputs for everythting
Also begin to start work on cross compilation, though that will have to
be finished later.
The patches are based on the first version of
https://reviews.llvm.org/D99484. It's very annoying to do the
back-porting but the review has uncovered nothing super major so I'm
fine sticking with what I've got.
Beyond making the outputs work, I also strove to re-sync the packages,
as they have been drifting pointlessly apart for some time.
----
Other misc notes, highly incomplete
- lvm-config-native and llvm-config are put in `dev` because they are
tools just for build time.
- Clang no longer has an lld dep. That was introduced in
db29857eb391ed002046090851a44c452b80bdbd, but if clang needs help
finding lld when it is used we should just pass it flags / put in the
resource dir. Providing it at build time increases critical path
length for no good reason.
----
A note on `nativeCC`:
`stdenv` takes tools from the previous stage, so:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.stdenv.cc`: `(?0, ?1, x)`
while:
1. `pkgsBuildBuild`: `(?1, x, x)`
2. `pkgsBuildBuild.targetPackages`: `(x, x, ?2)`
3. `pkgsBuildBuild.targetPackages.stdenv.cc`: `(?1, x, x)`
2020-10-15 08:23:57 +00:00
|
|
|
wrapProgram $out/bin/pure --prefix LD_LIBRARY_PATH : ${libllvm}/lib
|
2014-10-12 08:37:57 +00:00
|
|
|
'';
|
2013-02-17 09:59:43 +00:00
|
|
|
|
2011-04-08 08:00:55 +00:00
|
|
|
meta = {
|
2014-10-12 08:37:57 +00:00
|
|
|
description = "A modern-style functional programming language based on term rewriting";
|
|
|
|
maintainers = with lib.maintainers;
|
2011-04-08 08:00:55 +00:00
|
|
|
[
|
|
|
|
raskin
|
2014-10-23 12:30:27 +00:00
|
|
|
asppsa
|
2011-04-08 08:00:55 +00:00
|
|
|
];
|
2014-10-12 08:37:57 +00:00
|
|
|
platforms = with lib.platforms;
|
2011-04-08 08:00:55 +00:00
|
|
|
linux;
|
2014-10-12 08:37:57 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2020-01-18 18:05:48 +00:00
|
|
|
broken = true;
|
2011-04-08 08:00:55 +00:00
|
|
|
};
|
2015-03-31 06:20:31 +00:00
|
|
|
}
|