nixpkgs/pkgs/applications/science/logic/tptp/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

50 lines
1.4 KiB
Nix

{ lib, stdenv, fetchurl, yap, tcsh, perl, patchelf }:
stdenv.mkDerivation rec {
pname = "TPTP";
version = "7.2.0";
src = fetchurl {
urls = [
"http://tptp.cs.miami.edu/TPTP/Distribution/TPTP-v${version}.tgz"
"http://tptp.cs.miami.edu/TPTP/Archive/TPTP-v${version}.tgz"
];
sha256 = "0yq8452b6mym4yscy46pshg0z2my8xi74b5bp2qlxd5bjwcrg6rl";
};
nativeBuildInputs = [ patchelf ];
buildInputs = [ tcsh yap perl ];
installPhase = ''
sharedir=$out/share/tptp
mkdir -p $sharedir
cp -r ./ $sharedir
export TPTP=$sharedir
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
'';
meta = with lib; {
description = "Thousands of problems for theorem provers and tools";
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 = [];
platforms = platforms.all;
license = licenses.unfreeRedistributable;
};
}