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

  buildInputs = map (n: builtins.getAttr n x)
    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
  sourceInfo = rec {
    baseName="satallax";
    version="1.4";
    name="${baseName}-${version}";
    url="http://www.ps.uni-saarland.de/~cebrown/satallax/downloads/${name}.tar.gz";
    hash="0l8dq4nyfw2bdsyqmgb4v6fjw3739p8nqv4bh2gh2924ibzrq5fc";
  };
in
rec {
  src = a.fetchurl {
    url = sourceInfo.url;
    sha256 = sourceInfo.hash;
  };

  inherit (sourceInfo) name version;
  inherit buildInputs;

  phaseNames = ["doDeployMinisat" "doDeploy"];

  doDeployMinisat = a.fullDepEntry (''
    (
      cd minisat/simp
      make
    )

    ensureDir "$out/bin"
    cp minisat/simp/minisat "$out/bin"

    echo "(setq *minisat-binary* \"$out/bin/minisat\")" > config.lisp

  '') ["defEnsureDir" "minInit" "addInputs" "doUnpack"];
  doDeploy = a.fullDepEntry (''
    ensureDir "$out/share/satallax/build-dir"
    cp -r * "$out/share/satallax/build-dir"
    cd  "$out/share/satallax/build-dir"

    sbcl --load make.lisp
    ! ( ./test | grep ERROR )
    
    ensureDir "$out/bin"
    cp bin/satallax "$out/bin"
  '') ["defEnsureDir" "minInit" "addInputs" "doUnpack"];
      
  meta = {
    description = "A higher-order logic prover";
    maintainers = with a.lib.maintainers;
    [
      raskin
    ];
    platforms = with a.lib.platforms;
      unix;
    license = "free-noncopyleft";
    homepage = "http://www.ps.uni-saarland.de/~cebrown/satallax/";
  };
  passthru = {
    updateInfo = {
      downloadPage = "http://www.ps.uni-saarland.de/~cebrown/satallax/";
    };
  };
}) x