1{ lib, stdenv, fetchurl }:
2
3stdenv.mkDerivation rec {
4 version = "6.40";
5 pname = "clips";
6
7 src = fetchurl {
8 url = "mirror://sourceforge/clipsrules/CLIPS/${version}/clips_core_source_${
9 builtins.replaceStrings [ "." ] [ "" ] version
10 }.tar.gz";
11 sha256 = "1pr5l61zxf6kjs8b2b028g2aq45pigavwjmrf4l5mrdmlnk3fq5d";
12 };
13
14 postPatch = ''
15 substituteInPlace core/makefile --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
16 '';
17
18 makeFlags = [ "-C" "core" ];
19
20 installPhase = ''
21 runHook preInstall
22 install -D -t $out/bin core/clips
23 runHook postInstall
24 '';
25
26 meta = with lib; {
27 description = "A Tool for Building Expert Systems";
28 homepage = "http://www.clipsrules.net/";
29 longDescription = ''
30 Developed at NASA's Johnson Space Center from 1985 to 1996,
31 CLIPS is a rule-based programming language useful for creating
32 expert systems and other programs where a heuristic solution is
33 easier to implement and maintain than an algorithmic solution.
34 '';
35 license = licenses.publicDomain;
36 maintainers = [ maintainers.league ];
37 platforms = platforms.unix;
38 };
39}