summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Laporte <Vincent.Laporte@gmail.com>2018-02-24 18:45:20 +0000
committerVincent Laporte <vbgl@users.noreply.github.com>2018-02-28 19:09:43 +0100
commitd8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb (patch)
treea753e09c3c5006369e01ff3801e931daa476943b
parent4ab5d3a1e7a5b4ad419c8667dedfa72e90b748f2 (diff)
downloadnixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar.gz
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar.bz2
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar.lz
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar.xz
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.tar.zst
nixlib-d8ab8ddae1c3e5d0ce872a2cbfabaa616e6f93eb.zip
aspcud: 1.9.1 -> 1.9.4
-rw-r--r--pkgs/tools/misc/aspcud/default.nix39
1 files changed, 12 insertions, 27 deletions
diff --git a/pkgs/tools/misc/aspcud/default.nix b/pkgs/tools/misc/aspcud/default.nix
index 974b7691cb93..859112d29bc2 100644
--- a/pkgs/tools/misc/aspcud/default.nix
+++ b/pkgs/tools/misc/aspcud/default.nix
@@ -1,42 +1,27 @@
-{ stdenv, fetchurl,
-  boost, clasp, cmake, gringo, re2c
+{ stdenv, fetchzip
+, boost, clasp, cmake, gringo, re2c
 }:
 
-let
-  version = "1.9.1";
-in
-
 stdenv.mkDerivation rec {
+  version = "1.9.4";
   name = "aspcud-${version}";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/project/potassco/aspcud/${version}/aspcud-${version}-source.tar.gz";
-    sha256 = "09sqbshwrqz2fvlkz73mns5i3m70fh8mvwhz8450izy5lsligsg0";
+  src = fetchzip {
+    url = "https://github.com/potassco/aspcud/archive/v${version}.tar.gz";
+    sha256 = "0vrf7h7g99vw1mybqfrpxamsnf89p18czlzgjmxl1zkiwc7vjpzw";
   };
 
   buildInputs = [ boost clasp cmake gringo re2c ];
 
-  buildPhase = ''
-    cmake -DCMAKE_BUILD_TYPE=Release \
-      -DGRINGO_LOC=${gringo}/bin/gringo \
-      -DCLASP_LOC=${clasp}/bin/clasp \
-      -DENCODING_LOC=$out/share/aspcud/specification.lp \
-      .
-
-    make
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp bin/{aspcud,cudf2lp,lemon} $out/bin
-
-    mkdir -p $out/share/aspcud
-    cp ../share/aspcud/specification.lp $out/share/aspcud
-  '';
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=Release"
+    "-DASPCUD_GRINGO_PATH=${gringo}/bin/gringo"
+    "-DASPCUD_CLASP_PATH=${clasp}/bin/clasp"
+  ];
 
   meta = with stdenv.lib; {
     description = "Solver for package problems in CUDF format using ASP";
-    homepage = http://potasssco.sourceforge.net/;
+    homepage = "https://potassco.org/aspcud/";
     platforms = platforms.all;
     maintainers = [ maintainers.hakuch ];
     license = licenses.gpl3Plus;