summary refs log tree commit diff
path: root/pkgs/development/interpreters/clips/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/interpreters/clips/default.nix')
-rw-r--r--pkgs/development/interpreters/clips/default.nix30
1 files changed, 20 insertions, 10 deletions
diff --git a/pkgs/development/interpreters/clips/default.nix b/pkgs/development/interpreters/clips/default.nix
index cf0710f36a1..2edeaf9e4e8 100644
--- a/pkgs/development/interpreters/clips/default.nix
+++ b/pkgs/development/interpreters/clips/default.nix
@@ -1,19 +1,29 @@
-{ stdenv, fetchurl }:
+{ lib, stdenv, fetchurl }:
 
-stdenv.mkDerivation {
-  version = "6.30";
+stdenv.mkDerivation rec {
+  version = "6.40";
   pname = "clips";
+
   src = fetchurl {
-    url = "mirror://sourceforge/clipsrules/CLIPS/6.30/clips_core_source_630.tar.Z";
-    sha256 = "1r0m59l3mk9cwzq3nmyr5qxrlkzp3njls4hfv8ml85dmqh7n3ysy";
+    url = "mirror://sourceforge/clipsrules/CLIPS/${version}/clips_core_source_${
+        builtins.replaceStrings [ "." ] [ "" ] version
+      }.tar.gz";
+    sha256 = "1pr5l61zxf6kjs8b2b028g2aq45pigavwjmrf4l5mrdmlnk3fq5d";
   };
-  buildPhase = ''
-    make -C core -f ../makefiles/makefile.gcc
+
+  postPatch = ''
+    substituteInPlace core/makefile --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
   '';
+
+  makeFlags = [ "-C" "core" ];
+
   installPhase = ''
+    runHook preInstall
     install -D -t $out/bin core/clips
+    runHook postInstall
   '';
-  meta = with stdenv.lib; {
+
+  meta = with lib; {
     description = "A Tool for Building Expert Systems";
     homepage = "http://www.clipsrules.net/";
     longDescription = ''
@@ -23,7 +33,7 @@ stdenv.mkDerivation {
       easier to implement and maintain than an algorithmic solution.
     '';
     license = licenses.publicDomain;
-    maintainers = [maintainers.league];
-    platforms = platforms.linux;
+    maintainers = [ maintainers.league ];
+    platforms = platforms.unix;
   };
 }