summary refs log tree commit diff
path: root/pkgs/applications/science/logic/yices/default.nix
blob: b6b34d96d1541647f1c1dc0b6002786f955a2a81 (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 }:

assert stdenv.isLinux;

let
  libPath = stdenv.lib.makeLibraryPath [ stdenv.gcc.libc ];
in
stdenv.mkDerivation rec {
  name    = "yices-${version}";
  version = "2.2.1";

  src =
    if stdenv.system == "i686-linux"
    then fetchurl {
      url = "http://yices.csl.sri.com/cgi-bin/yices2-newdownload.cgi?file=yices-2.2.1-i686-pc-linux-gnu-static-gmp.tar.gz&accept=I+accept";
      name = "yices-${version}-i686.tar.gz";
      sha256 = "12jzk3kqlbqa5x6rl92cpzj7dch7gm7fnbj72wifvwgdj4zyhrra";
    }
    else fetchurl {
      url = "http://yices.csl.sri.com/cgi-bin/yices2-newdownload.cgi?file=yices-2.2.1-x86_64-unknown-linux-gnu-static-gmp.tar.gz&accept=I+accept";
      name = "yices-${version}-x86_64.tar.gz";
      sha256 = "0fpmihf6ykcg4qbsimkamgcwp4sl1xyxmz7q28ily91rd905ijaj";
    };

  buildPhase = false;
  installPhase = ''
    mkdir -p $out/bin $out/lib $out/include
    cd bin     && mv * $out/bin     && cd ..
    cd lib     && mv * $out/lib     && cd ..
    cd include && mv * $out/include && cd ..

    patchelf --set-rpath ${libPath} $out/lib/libyices.so.${version}
  '';

  meta = {
    description = "Yices is a high-performance theorem prover and SMT solver";
    homepage    = "http://yices.csl.sri.com";
    license     = stdenv.lib.licenses.unfreeRedistributable;
    platforms   = stdenv.lib.platforms.linux;
    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
  };
}