From 462958b3b73468febd1a9c0a7be97976c0854401 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 29 Jan 2016 09:36:50 +0100 Subject: [PATCH 1/2] tptp: 6.1.0 -> 6.3.0 --- pkgs/applications/science/logic/tptp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/logic/tptp/default.nix b/pkgs/applications/science/logic/tptp/default.nix index d4c62858753..636efa63595 100644 --- a/pkgs/applications/science/logic/tptp/default.nix +++ b/pkgs/applications/science/logic/tptp/default.nix @@ -11,14 +11,14 @@ let (builtins.attrNames (builtins.removeAttrs x helperArgNames)); sourceInfo = rec { baseName="TPTP"; - version="6.1.0"; + version="6.3.0"; name="${baseName}-${version}"; urls= [ "http://www.cs.miami.edu/~tptp/TPTP/Distribution/TPTP-v${version}.tgz" "http://www.cs.miami.edu/~tptp/TPTP/Archive/TPTP-v${version}/TPTP-v${version}.tgz" ]; - hash="054p0kx9qh619ixslxpb4qcwvcqr4kan154b3a87b546b78k7kv4"; + hash="17wl80mnm91jp3npdjzfbb8ds45f2gni250jlfw0d91i1476wcl3"; }; in rec { From 73468cf4d49cd188506a4aec1a7d9fc20765c2b0 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Fri, 29 Jan 2016 10:11:38 +0100 Subject: [PATCH 2/2] tptp: replace use of builderDefsPackage --- .../science/logic/tptp/default.nix | 108 ++++++------------ 1 file changed, 33 insertions(+), 75 deletions(-) diff --git a/pkgs/applications/science/logic/tptp/default.nix b/pkgs/applications/science/logic/tptp/default.nix index 636efa63595..f3cd8ab6927 100644 --- a/pkgs/applications/science/logic/tptp/default.nix +++ b/pkgs/applications/science/logic/tptp/default.nix @@ -1,90 +1,48 @@ -x@{builderDefsPackage - , yap, tcsh, perl, patchelf, pkgsi686Linux - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["pkgsi686Linux"]; +{ stdenv, fetchurl, yap, tcsh, perl, patchelf }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="TPTP"; - version="6.3.0"; - name="${baseName}-${version}"; - urls= - [ - "http://www.cs.miami.edu/~tptp/TPTP/Distribution/TPTP-v${version}.tgz" - "http://www.cs.miami.edu/~tptp/TPTP/Archive/TPTP-v${version}/TPTP-v${version}.tgz" +stdenv.mkDerivation rec { + name = "TPTP-${version}"; + version = "6.3.0"; + + src = fetchurl { + url = [ + "http://www.cs.miami.edu/~tptp/TPTP/Distribution/TPTP-v${version}.tgz" + "http://www.cs.miami.edu/~tptp/TPTP/Archive/TPTP-v${version}/TPTP-v${version}.tgz" ]; - hash="17wl80mnm91jp3npdjzfbb8ds45f2gni250jlfw0d91i1476wcl3"; - }; -in -rec { - src = a.fetchurl { - urls = sourceInfo.urls; - sha256 = sourceInfo.hash; + sha256 = "17wl80mnm91jp3npdjzfbb8ds45f2gni250jlfw0d91i1476wcl3"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ tcsh yap perl patchelf ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["goTarget" "doUnpack" "fixPlace" "setVars" "installScripts" - "patchBinaries" "makeLinks"]; + installPhase = '' + sharedir=$out/share/tptp - goTarget = a.fullDepEntry '' - mkdir -p "$out"/share/ - cd "$out"/share/ - '' ["defEnsureDir" "minInit"]; + mkdir -p $sharedir + cp -r ./ $sharedir - fixPlace = a.fullDepEntry '' - cd .. - mv TPTP-* tptp - cd tptp - '' ["minInit" "doUnpack"]; + export TPTP=$sharedir - setVars = a.noDepEntry '' - export TPTP="$PWD" + tcsh $sharedir/Scripts/tptp2T_install -default + + substituteInPlace $sharedir/TPTP2X/tptp2X_install --replace /bin/mv mv + tcsh $sharedir/TPTP2X/tptp2X_install -default + + patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $sharedir/Scripts/tptp4X + + mkdir -p $out/bin + ln -s $sharedir/TPTP2X/tptp2X $out/bin + ln -s $sharedir/Scripts/tptp2T $out/bin + ln -s $sharedir/Scripts/tptp4X $out/bin ''; - installScripts = a.fullDepEntry '' - tcsh "$out/share/tptp/Scripts/tptp2T_install" -default - - sed -e 's@^ */bin/@@' -i TPTP2X/* - - tcsh "$out/share/tptp/TPTP2X/tptp2X_install" -default - '' ["addInputs"]; - - makeLinks = a.fullDepEntry '' - mkdir -p "$out/bin" - ln -s "../share/tptp/TPTP2X/tptp2X" "$out/bin" - ln -s "../share/tptp/Scripts/tptp2T" "$out/bin" - ln -s "../share/tptp/Scripts/tptp4X" "$out/bin" - '' ["defEnsureDir" "minInit"]; - - patchBinaries = a.fullDepEntry '' - patchelf --set-interpreter "${pkgsi686Linux.glibc}"/lib/ld-linux.so.* \ - "Scripts/tptp4X" - '' ["addInputs"]; - - meta = { + meta = with stdenv.lib; { description = "Thousands of problems for theorem provers and tools"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - # A GiB of data. Installation is unpacking and editing a few files. + maintainers = with maintainers; [ raskin gebner ]; + # 6.3 GiB of data. Installation is unpacking and editing a few files. # No sense in letting Hydra build it. # Also, it is unclear what is covered by "verbatim" - we will edit configs hydraPlatforms = []; - license = "verbatim-redistribution"; + platforms = platforms.all; + license = licenses.unfreeRedistributable; }; - passthru = { - updateInfo = { - downloadPage = "http://tptp.org/"; - }; - }; -}) x - +}