summary refs log tree commit diff
path: root/pkgs/applications/science/logic/iprover/default.nix
blob: b1f48fdf04b92b183ebaf6b036ea7bd02d89b4c7 (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
x@{builderDefsPackage
  , ocaml, eprover
  , ...}:
builderDefsPackage
(a :  
let 
  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
    [];

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    baseName="iprover";
    version="0.8.1";
    name="${baseName}_v${version}";
    url="http://${baseName}.googlecode.com/files/${name}.tar.gz";
    hash="15qn523w4l296np5rnkwi50a5x2xqz0kaza7bsh9bkazph7jma7w";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  name = "${sourceInfo.baseName}-${sourceInfo.version}";
  inherit buildInputs;

  /* doConfigure should be removed if not needed */
  phaseNames = ["doConfigure" "doMake" "doDeploy"];
  configureCommand = "sh configure";
  doDeploy = a.fullDepEntry (''
    mkdir -p "$out/bin"
    cp iproveropt "$out/bin"

    mkdir -p "$out/share/${name}"
    cp *.p "$out/share/${name}"
    echo -e "#! /bin/sh\\n$out/bin/iproveropt --clausifier \"${eprover}/bin/eprover\" --clausifier_options \" --tstp-format --silent --cnf \" \"\$@\"" > "$out"/bin/iprover
    chmod a+x  "$out"/bin/iprover
  '') ["defEnsureDir" "minInit" "doMake"];
      
  meta = {
    description = "An automated first-order logic theorem prover";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      linux;
    license = stdenv.lib.licenses.gpl3;
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://code.google.com/p/iprover/downloads/list";
    };
  };
}) x