1{
2 stdenv,
3 lib,
4 fetchFromBitbucket,
5 jdk,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "factplusplus";
10 version = "1.6.5";
11
12 src = fetchFromBitbucket {
13 owner = "dtsarkov";
14 repo = "factplusplus";
15 rev = "Release-${version}";
16 sha256 = "wzK1QJsNN0Q73NM+vjaE/vLuGf8J1Zu5ZPAkZNiKnME=";
17 };
18
19 buildInputs = [ jdk ];
20
21 configurePhase = ''
22 runHook preConfigure
23
24 sed -i 's/OS = MACOSX/OS = LINUX/g' Makefile.include
25 printf '%s\n%s\n' '#include <iostream>' "$(cat Kernel/AtomicDecomposer.cpp)" > Kernel/AtomicDecomposer.cpp
26
27 runHook postConfigure
28 '';
29
30 installPhase = ''
31 runHook preInstall
32
33 install -Dm755 FaCT++.{C,JNI,KE,Kernel}/obj/*.{so,o} -t $out/lib/
34 install -Dm755 FaCT++/obj/FaCT++ -t $out/bin
35
36 runHook postInstall
37 '';
38
39 meta = with lib; {
40 description = "Tableaux-based reasoner for expressive Description Logics (DL)";
41 homepage = "http://owl.cs.manchester.ac.uk/tools/fact/";
42 maintainers = [ maintainers.mgttlinger ];
43 license = licenses.gpl2Plus;
44 platforms = with platforms; linux ++ darwin ++ windows;
45 broken = !stdenv.hostPlatform.isLinux;
46 mainProgram = "FaCT++";
47 };
48}