From a228252b69b5edb088de87e0a03e98880c59d01d Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 7 Jul 2015 20:03:30 +0200 Subject: [PATCH] cvc3: reimplement using mkDerivation --- .../science/logic/cvc3/default.nix | 57 ++++++------------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/pkgs/applications/science/logic/cvc3/default.nix b/pkgs/applications/science/logic/cvc3/default.nix index ce6e039c5b1b..505d09ef3903 100644 --- a/pkgs/applications/science/logic/cvc3/default.nix +++ b/pkgs/applications/science/logic/cvc3/default.nix @@ -1,48 +1,27 @@ -x@{builderDefsPackage - , flex, bison, gmp, perl - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["gmp"]; +{ stdenv, fetchurl, flex, bison, gmp, perl }: - buildInputs = (map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames))) - ++ [(a.lib.overrideDerivation x.gmp (y: {dontDisableStatic=true;}))]; - sourceInfo = rec { - baseName="cvc3"; - version="2.4.1"; - name="${baseName}-${version}"; - url="http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${name}.tar.gz"; - hash="1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; +stdenv.mkDerivation rec { + name = "cvc3-${version}"; + version = "2.4.1"; - inherit (sourceInfo) name version; - inherit buildInputs; + src = fetchurl { + url = "http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${name}.tar.gz"; + sha256 = "1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym"; + }; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixPaths" "doConfigure" "doMakeInstall"]; - fixPaths = a.fullDepEntry ('' + buildInputs = [ gmp flex bison perl ]; + + preConfigure = '' sed -e "s@ /bin/bash@bash@g" -i Makefile.std find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';' - '') ["minInit" "doUnpack"]; + ''; - meta = { + meta = with stdenv.lib; { description = "A prover for satisfiability modulo theory (SMT)"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.free; + maintainers = with maintainers; + [ raskin ]; + platforms = platforms.linux; + license = licenses.free; homepage = "http://www.cs.nyu.edu/acsys/cvc3/index.html"; }; passthru = { @@ -50,4 +29,4 @@ rec { downloadPage = "http://www.cs.nyu.edu/acsys/cvc3/download.html"; }; }; -}) x +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 679b155ccd5c..0cac671bdf61 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14809,7 +14809,9 @@ let coqPackages = recurseIntoAttrs (mkCoqPackages_8_4 coqPackages); coqPackages_8_5 = recurseIntoAttrs (mkCoqPackages_8_5 coqPackages_8_5); - cvc3 = callPackage ../applications/science/logic/cvc3 {}; + cvc3 = callPackage ../applications/science/logic/cvc3 { + gmp = lib.overrideDerivation gmp (a: { dontDisableStatic = true; }); + }; cvc4 = callPackage ../applications/science/logic/cvc4 {}; ekrhyper = callPackage ../applications/science/logic/ekrhyper {};