about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Ivanov <gnidorah@users.noreply.github.com>2016-10-05 21:20:58 +0300
committerAlex Ivanov <gnidorah@users.noreply.github.com>2016-10-05 21:20:58 +0300
commit2aeb234f25fc57600bb8f381ef1d4d6fc678b410 (patch)
tree3ceb57b3db4dba681d8c033b469e80ffa8a03f38
parentcb79662bf38aff3890d94663e6489be097bcb4cc (diff)
downloadnixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar.gz
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar.bz2
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar.lz
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar.xz
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.tar.zst
nixlib-2aeb234f25fc57600bb8f381ef1d4d6fc678b410.zip
pakcs: update to 1.14.0
-rw-r--r--pkgs/development/compilers/pakcs/adjust-buildsystem.patch22
-rw-r--r--pkgs/development/compilers/pakcs/default.nix97
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 73 insertions, 48 deletions
diff --git a/pkgs/development/compilers/pakcs/adjust-buildsystem.patch b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
index ce0b42c9e344..2d1f92af81df 100644
--- a/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
+++ b/pkgs/development/compilers/pakcs/adjust-buildsystem.patch
@@ -1,25 +1,3 @@
-diff -Naur pakcs-1.11.4-upstream/Makefile pakcs-1.11.4/Makefile
---- pakcs-1.11.4-upstream/Makefile	2014-10-24 05:12:37.000000000 -0430
-+++ pakcs-1.11.4/Makefile	2015-01-05 16:26:39.256709080 -0430
-@@ -94,7 +94,6 @@
- install: cleanoldinfos installscripts copylibs
- 	@echo "PAKCS installation configuration (file pakcsinitrc):"
- 	@cat pakcsinitrc
--	$(MAKE) frontend
- 	# pre-compile all libraries:
- 	@cd lib && $(MAKE) fcy
- 	# install the Curry2Prolog compiler as a saved system:
-@@ -145,10 +144,6 @@
- # compile the tools:
- .PHONY: tools
- tools:
--	# compile the Curry Port Name Server demon:
--	@if [ -r bin/pakcs ] ; then cd cpns       && $(MAKE) ; fi
--	# compile the event handler demon for dynamic web pages:
--	@if [ -r bin/pakcs ] ; then cd www        && $(MAKE) ; fi
- 	@if [ -r bin/pakcs ] ; then cd currytools && $(MAKE) ; fi
- 	@if [ -r bin/pakcs ] ; then cd tools      && $(MAKE) ; fi
- 
 diff -Naur pakcs-1.11.4-upstream/scripts/pakcs.sh pakcs-1.11.4/scripts/pakcs.sh
 --- pakcs-1.11.4-upstream/scripts/pakcs.sh	2014-10-24 05:06:07.000000000 -0430
 +++ pakcs-1.11.4/scripts/pakcs.sh	2015-01-05 16:26:15.697982791 -0430
diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix
index 739804646c2a..92b916ccb8e1 100644
--- a/pkgs/development/compilers/pakcs/default.nix
+++ b/pkgs/development/compilers/pakcs/default.nix
@@ -1,41 +1,86 @@
-{ stdenv, fetchurl, cabal, swiProlog, either, mtl, syb
+{ stdenv, fetchurl, swiProlog, haskellPackages
 , glibcLocales, makeWrapper, rlwrap, tk, which }:
 
 let
-  fname = "pakcs-1.11.4";
+  fname = "pakcs-1.14.0";
 
   fsrc = fetchurl {
     url = "http://www.informatik.uni-kiel.de/~pakcs/download/${fname}-src.tar.gz";
-    sha256 = "1xsn8h58pi1jp8wr4abyrqdps840j8limyv5i812z49npf91fy5c";
+    sha256 = "1651ssh4ql79x8asd7kp4yis2n5rhn3lml4s26y03b0cgbfhs78s";
   };
 
+  swiPrologLocked = stdenv.lib.overrideDerivation swiProlog (oldAttrs: rec {
+    version = "6.6.6";
+    name = "swi-prolog-${version}";
+    src = fetchurl {
+      url = "http://www.swi-prolog.org/download/stable/src/pl-${version}.tar.gz";
+      sha256 = "0vcrfskm2hyhv30lxr6v261myb815jc3bgmcn1lgsc9g9qkvp04z";
+    };
+  });
+
 in
 stdenv.mkDerivation rec {
 
   name = fname;
 
-  curryBase = cabal.mkDerivation(self: {
-    pname = "curryBase";
-    version = "local";
-    src = fsrc;
-    sourceRoot = "${name}/frontend/curry-base";
-    isLibrary = true;
-    buildDepends = [ mtl syb ];
-  });
-
-  curryFront = cabal.mkDerivation(self: {
-    pname = "curryFront";
-    version = "local";
-    src = fsrc;
-    sourceRoot = "${name}/frontend/curry-frontend";
-    isLibrary = true;
-    isExecutable = true;
-    buildDepends = [ either mtl syb curryBase ];
-  });
+  curryBase = haskellPackages.callPackage (
+    { mkDerivation, base, Cabal, containers, directory, either
+    , filepath, mtl, pretty, stdenv, syb, time
+    }:
+    mkDerivation {
+      pname = "curry-base";
+      version = "0.4.1";
+      src = fsrc;
+      libraryHaskellDepends = [
+        base containers directory either filepath mtl pretty syb time
+      ];
+      testHaskellDepends = [ base Cabal filepath mtl ];
+      homepage = "http://curry-language.org";
+      description = "Functions for manipulating Curry programs";
+      license = "unknown";
+
+      postUnpack = ''
+        mv ${name} ${name}.orig
+        ln -s ${name}.orig/frontend/curry-base ${name}
+      '';
+      doCheck = false;
+    }
+  ) {};
+
+  curryFront = haskellPackages.callPackage (
+    { mkDerivation, base, Cabal, containers, directory
+    , filepath, mtl, network-uri, process, stdenv, syb, transformers
+    }:
+    mkDerivation {
+      pname = "curry-frontend";
+      version = "0.4.1";
+      src = fsrc;
+      isLibrary = true;
+      isExecutable = true;
+      libraryHaskellDepends = [
+        base containers curryBase directory filepath mtl network-uri
+        process syb transformers
+      ];
+      executableHaskellDepends = [
+        base containers curryBase directory filepath mtl network-uri
+        process syb transformers
+      ];
+      testHaskellDepends = [ base Cabal curryBase filepath ];
+      homepage = "http://curry-language.org";
+      description = "Compile the functional logic language Curry to several intermediate formats";
+      license = "unknown";
+
+      postUnpack = ''
+        mv ${name} ${name}.orig
+        ln -s ${name}.orig/frontend/curry-frontend ${name}
+      '';
+      doCheck = false;
+    }
+  ) {};
 
   src = fsrc;
 
-  buildInputs = [ swiProlog makeWrapper glibcLocales rlwrap tk which ];
+  buildInputs = [ swiPrologLocked makeWrapper glibcLocales rlwrap tk which ];
 
   patches = [ ./adjust-buildsystem.patch ];
 
@@ -45,7 +90,7 @@ stdenv.mkDerivation rec {
     export HOME=$(pwd)/phony-home
 
     # SWI Prolog
-    sed -i 's@SWIPROLOG=@SWIPROLOG='${swiProlog}/bin/swipl'@' pakcsinitrc
+    sed -i 's@SWIPROLOG=@SWIPROLOG='${swiPrologLocked}/bin/swipl'@' scripts/pakcsinitrc.sh
   '';
 
   buildPhase = ''
@@ -59,6 +104,7 @@ stdenv.mkDerivation rec {
 
     # Set up link to cymake, which has been built already.
     ln -s ${curryFront}/bin/cymake $out/pakcs/bin/
+    rm -r frontend
 
     # Prevent embedding the derivation build directory as temp.
     export TEMP=/tmp
@@ -77,7 +123,7 @@ stdenv.mkDerivation rec {
 
     # Place emacs lisp files in expected locations.
     mkdir -p $out/share/emacs/site-lisp/curry-pakcs
-    for e in "$out/tools/emacs/"*.el ; do
+    for e in "$out/pakcs/tools/emacs/"*.el ; do
       cp $e $out/share/emacs/site-lisp/curry-pakcs/ ;
     done
 
@@ -104,8 +150,7 @@ stdenv.mkDerivation rec {
       with dynamic web pages, prototyping embedded systems).
     '';
 
-    maintainers = [ stdenv.lib.maintainers.kkallio ];
+    maintainers = [ stdenv.lib.maintainers.gnidorah ];
     platforms = stdenv.lib.platforms.linux;
-    hydraPlatforms = stdenv.lib.platforms.none;
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 836328a45e17..ebccb3feefc7 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3034,6 +3034,8 @@ in
     nix = nixUnstable;
   };
 
+  pakcs = callPackage ../development/compilers/pakcs {};
+
   pal = callPackage ../tools/misc/pal { };
 
   pandoc = haskell.lib.overrideCabal haskellPackages.pandoc (drv: {