summary refs log tree commit diff
path: root/pkgs/development/compilers/bigloo/default.nix
blob: 2fb0b7c2276b2a38ea37fdcf326bf2945d2aa2a0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
args:
( args.mkDerivationByConfiguration {
    flagConfig = {
    /*
Bigloo compiler:
   --native=yes|no [default yes]
   --jvm=yes|no|force [default no]
   --dotnet=yes|no|force [default no]
   --customgc=yes|no [default yes]
   --bee=partial|full [default partial]

API:
   --enable-[calendar|fthread|mail|multimedia|pkgcomp|pkglib|pthread|sqlite|srfi1|ssl|web]
   --disable-[calendar|fthread|mail|multimedia|pkgcomp|pkglib|pthread|sqlite|srfi1|ssl|web]

Path:
   --prefix=dir (sets bin, lib, zip, man, info and doc dirs)
   --bindir=file
   --libdir=file
   --gcdir=dir (directory for non custom gc library)
   --fildir=file
   --zipdir=file
   --dlldir=file
   --mandir=file
   --infodir=file
   --docdir=file
   --tmpdir=file (Bigloo tmp dir)
   --tmp=file (Installation tmp dir)
   --lispdir=file

Tools and compilers:
   --bigloo=comp [default bigloo]
   --cc=comp [default gcc]
   --ld=comp [default gcc]
   --as=asm
   --cflags=compilation flags
   --lflags=compiler link flags
   --coflags=optimization_flags
   --cpicflags=pic_flags
   --ldlibs=ld_libs
   --ldcomplibs=ld_compiler_libs
   --ldflags=ld_flags
   --emacs=file
   --xemacs=file (deprecated, use "--emacs" option)
   --indent=file
   --icc (configure for icc)

Host configuration:
   --arch=[i586|i686|athlon|athlon-tbird|athlon-mp|athlon-xp|k6-2|k6-3|pentium3|pentium4] (configure for specified hardware)
   --a.out=file
   --a.bat=file
   --dirname=file-or-command
   --force-posixos=operating-system
   --os-win32
   --os-macosx (tune for MacOSX)
   --no-os-macosx (disable MacOSX auto configuration)
   --cygwin-dos-path=[dos path]
   --cygwin-dos-jvm=yes|no [default yes]
   --no-share (disable shared libraries support)
   --no-ldpreload
   --sharedbde=yes|no [default no] (link Bde tools against shared libraries)
   --sharedcompiler=yes|no [default no] (link Bigloo against shared libraries)

JVM configuration:
   --java=file
   --javac=file
   --javaprefix=dir
   --javashell=shell [should be sh or msdos (default sh)]
   --native-default-backend
   --jvm-default-backend

.NET configuration:
   --pnet (configure for GNU pnet)
   --mono (configure for Ximian Mono)
   --dotnetldstyle=style [should be pnet, mono]
   --dotnetcsccstyle=style [should be pnet, mono]
   --dotnetclrstyle=style [should be pnet, mono]
   --dotnetcscc=file
   --dotnetld=file
   --dotnetclr=file
   --dotnetclropt=options
   --dotnetshell=shell [should be sh or msdos (default sh)]
   --dotnetasm=asm [optional]

Misc:
   --finalization=yes|no [default no]
   --benchmark=yes|no [default no] (must use --arch too)
   --stack-check=no

Configuration settings:
   --bigloo.h[=file]
   --bigloo_gc.h[=file]
   --bigloo_config.h[=file]
   --bigloo_config.jvm[=file]
   --Makefile.config=file
   --configure.log=file
   --no-summary
   --bootconfig
   --bootdir=dir
   --configureinfo=yes|no [default no]

   */

    }; 

    extraAttrs = co : rec {
      name = "bigloo3.0d-alpha05Feb08"; # Thanks to Manuel Serrano for fixing the mv trouble 

      # take care, modifying generated C-Code (altering string and length of string) 
      preConfigure = 
        "sed -i -e 's=/bin/rm -f \", 14=rm -f \", 9=' "
         + " -e 's=/bin/mv \", 11=mv \", 6=' "
         + "comptime/Cc/cc.c\n"
      + "sed -i -e 's=/bin/rm=rm=' "
           + " -e 's=/bin/mv=mv=' "
         + "configure  gc/install-gc-*";

      src = args.fetchurl {
        url = "ftp://ftp-sop.inria.fr/mimosa/fp/Bigloo/${name}.tar.gz";
        sha256 = "03rknb1nl3z2f86k6iazbrapmli2m8lcs21lqrri8ys8s72dm33w";
      };

    meta = { 
      description = "scheme -> C / Java compiler (.net experimental)";
      homepage = http://www-sop.inria.fr/mimosa/fp/Bigloo/;
      # you can choose one of the following licenses: 
      license = ["GPL"];
    };
  };
} ) args