From 93fbb947b345da190d52da6f9e48d46194bb8f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Zimmermann?= Date: Thu, 3 Nov 2016 12:14:45 +0100 Subject: [PATCH] aspcud: fix by updating the dependencies (#20086) Depends on gringo but gringo is now maintained as part of the clingo suite. This commit removes gringo (standalone) and replace it with the latest version of clingo. This update follows closely the old derivation for gringo (see 99e06fe). --- pkgs/tools/misc/aspcud/default.nix | 6 +-- pkgs/tools/misc/clingo/default.nix | 37 ++++++++++++++++++ pkgs/tools/misc/gringo/default.nix | 39 ------------------- .../misc/gringo/gringo-4.5.4-cmath.patch | 11 ------ pkgs/top-level/all-packages.nix | 2 +- 5 files changed, 41 insertions(+), 54 deletions(-) create mode 100644 pkgs/tools/misc/clingo/default.nix delete mode 100644 pkgs/tools/misc/gringo/default.nix delete mode 100644 pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch diff --git a/pkgs/tools/misc/aspcud/default.nix b/pkgs/tools/misc/aspcud/default.nix index 577c0a33b3e..0bdcfa76fec 100644 --- a/pkgs/tools/misc/aspcud/default.nix +++ b/pkgs/tools/misc/aspcud/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, - boost, clasp, cmake, gringo, re2c + boost, clasp, cmake, clingo, re2c }: let @@ -14,11 +14,11 @@ stdenv.mkDerivation rec { sha256 = "029035vcdk527ssf126i8ipi5zs73gqpbrg019pvm9r24rf0m373"; }; - buildInputs = [ boost clasp cmake gringo re2c ]; + buildInputs = [ boost clasp cmake clingo re2c ]; buildPhase = '' cmake -DCMAKE_BUILD_TYPE=Release \ - -DGRINGO_LOC=${gringo}/bin/gringo \ + -DGRINGO_LOC=${clingo}/bin/gringo \ -DCLASP_LOC=${clasp}/bin/clasp \ -DENCODING_LOC=$out/share/aspcud/specification.lp \ . diff --git a/pkgs/tools/misc/clingo/default.nix b/pkgs/tools/misc/clingo/default.nix new file mode 100644 index 00000000000..6ab0a68920f --- /dev/null +++ b/pkgs/tools/misc/clingo/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, + bison, re2c, scons +}: + +let + version = "5.1.0"; +in + +stdenv.mkDerivation rec { + name = "clingo-${version}"; + + src = fetchFromGitHub { + owner = "potassco"; + repo = "clingo"; + rev = "v${version}"; + sha256 = "1rvaqqa8xfagsqxk45lax3l29sksijd3zvl662vpvdi1sy0d71xv"; + }; + + buildInputs = [ bison re2c scons ]; + + buildPhase = '' + scons --build-dir=release + ''; + + installPhase = '' + mkdir -p $out/bin + cp build/release/{gringo,clingo,reify,lpconvert} $out/bin/ + ''; + + meta = with stdenv.lib; { + description = "A grounder and solver for logic programs."; + homepage = http://potassco.org; + platforms = platforms.linux; + maintainers = [ maintainers.hakuch ]; + license = licenses.gpl3Plus; + }; +} diff --git a/pkgs/tools/misc/gringo/default.nix b/pkgs/tools/misc/gringo/default.nix deleted file mode 100644 index ae71c01314c..00000000000 --- a/pkgs/tools/misc/gringo/default.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchurl, - bison, re2c, scons -}: - -let - version = "4.5.4"; -in - -stdenv.mkDerivation rec { - name = "gringo-${version}"; - - src = fetchurl { - url = "mirror://sourceforge/project/potassco/gringo/${version}/gringo-${version}-source.tar.gz"; - sha256 = "16k4pkwyr2mh5w8j91vhxh9aff7f4y31npwf09w6f8q63fxvpy41"; - }; - - buildInputs = [ bison re2c scons ]; - - patches = [ - ./gringo-4.5.4-cmath.patch - ]; - - buildPhase = '' - scons --build-dir=release - ''; - - installPhase = '' - mkdir -p $out/bin - cp build/release/gringo $out/bin/gringo - ''; - - meta = with stdenv.lib; { - description = "Converts input programs with first-order variables to equivalent ground programs"; - homepage = http://potassco.sourceforge.net/; - platforms = platforms.linux; - maintainers = [ maintainers.hakuch ]; - license = licenses.gpl3Plus; - }; -} diff --git a/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch b/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch deleted file mode 100644 index 7b5510e2344..00000000000 --- a/pkgs/tools/misc/gringo/gringo-4.5.4-cmath.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- gringo/libgringo/src/term.cc~ 2016-07-12 23:56:10.593577749 -0400 -+++ gringo/libgringo/src/term.cc 2016-07-12 23:52:35.169968338 -0400 -@@ -22,6 +22,8 @@ - #include "gringo/logger.hh" - #include "gringo/graph.hh" - -+#include -+ - namespace Gringo { - - // {{{ definition of Defines diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index eb17f5eaae3..44e788af7c4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -864,7 +864,7 @@ in goa = callPackage ../development/tools/goa { }; - gringo = callPackage ../tools/misc/gringo { }; + clingo = callPackage ../tools/misc/clingo { }; gti = callPackage ../tools/misc/gti { };