summary refs log tree commit diff
path: root/pkgs/applications/science/math/yacas/default.nix
blob: 7b97e1a82c009de660b158b108ce532125a82996 (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
{stdenv, fetchurl, perl}: 

stdenv.mkDerivation rec {
  name = "yacas-1.2.2";

  src = fetchurl {
    url = "http://yacas.sourceforge.net/backups/${name}.tar.gz";
    sha256 = "1dmafm3w0lm5w211nwkfzaid1rvvmgskz7k4500pjhgdczi5sd78";
  };

  # Perl is only for the documentation
  buildNativeInputs = [ perl ];

  patches = [ ./gcc43.patch ];

  crossAttrs = {
    # Trick to get host-built programs needed for the cross-build.
    # If yacas had proper makefiles, this would not be needed.
    preConfigure = ''
      ./configure
      pushd src
      make mkfastprimes 
      cp mkfastprimes ../..
      popd
      pushd manmake
      make manripper removeduplicates
      cp manripper removeduplicates ../..
      popd
    '';
    preBuild = ''
      cp ../mkfastprimes ../manripper ../removeduplicates src
    '';
  };

  meta = { 
      description = "Easy to use, general purpose Computer Algebra System";
      homepage = http://yacas.sourceforge.net/;
      license = "GPLv2+";
      maintainers = with stdenv.lib.maintainers; [viric];
      platforms = with stdenv.lib.platforms; all;
  };
}