From a228252b69b5edb088de87e0a03e98880c59d01d Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 7 Jul 2015 20:03:30 +0200 Subject: cvc3: reimplement using mkDerivation --- pkgs/applications/science/logic/cvc3/default.nix | 57 ++++++++---------------- 1 file changed, 18 insertions(+), 39 deletions(-) (limited to 'pkgs/applications/science') 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"; + + src = fetchurl { + url = "http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${name}.tar.gz"; + sha256 = "1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym"; + }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ gmp flex bison perl ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixPaths" "doConfigure" "doMakeInstall"]; - fixPaths = a.fullDepEntry ('' + 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 +} -- cgit 1.4.1