Add the following to your ~/.nixpkgs/config.nix
:
alicemlEnv = pkgs.myEnvFun {
name = "alicemlEnv";
buildInputs = [ stdenv gcc smlnj libtool gnumake381 autoconf automake111x
zlib file which zsh vimWrapper gmp m4 gnome.gtk
gnome.libgnomecanvas pango sqlite libxml2 pkgconfig ];
extraCmds = ''
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${gcc.gcc}/lib64
for i in $nativeBuildInputs; do
LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$i/lib
done
export LD_LIBRARY_PATH
unset http_proxy
'';
};
Execute:
$ nix-env -i env-alicemlEnv
Clone the aliceml repository and use the nix
branch:
$ git clone git://github.com/doublec/aliceml
$ cd aliceml
$ git checkout -b nix origin/nix
Load the Nix AliceML environment:
$ load-env-alicemlEnv
Run the top level Makefile:
$ make
Add the following to the PATH after running make
:
$ export PATH=$PATH:`pwd`/build/distro/bin
You can set this path after exiting the Nix AliceML environment if desired. It runs fine outside of it once build.
Run it and try some things:
$ alice
Alice 1.4 ("Kraftwerk 'Equaliser' Album") mastered 2014/05/28
### loaded signature from x-alice:/lib/system/Print
### loaded signature from x-alice:/lib/tools/Inspector
### loaded signature from x-alice:/lib/distribution/Remote
- 2+3;
val it : int = 5
- inspect 5;
...GUI inspector starts...
- exit();
Ideally I'd have a build definition that installs it in the users profile but I haven't got this working yet.