3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/math/calc/default.nix

48 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchurl, makeWrapper, glibc, readline, ncurses, utillinux }:
2016-02-24 21:47:21 +00:00
with stdenv.lib;
let
makeFlags = ''
INCDIR=${glibc.dev}/include \
2016-02-24 21:47:21 +00:00
BINDIR=$out/bin LIBDIR=$out/lib CALC_INCDIR=$out/include/calc CALC_SHAREDIR=$out/share/calc MANDIR=$out/share/man/man1 \
USE_READLINE=-DUSE_READLINE READLINE_LIB=-lreadline READLINE_EXTRAS='-lhistory -lncurses' \
TERMCONTROL=-DUSE_TERMIOS \
'';
in
stdenv.mkDerivation rec {
name = "calc-${version}";
calc: 2.12.6.3 -> 2.12.6.6 Semi-automatic update. These checks were done: - built on NixOS - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -V` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -h` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/piforever -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/piforever -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped -v` and found version 2.12.6.6 - found 2.12.6.6 with grep in /nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6 - found 2.12.6.6 in filename of file in /nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6
2018-03-08 04:08:56 +00:00
version = "2.12.6.6";
2016-02-24 21:47:21 +00:00
src = fetchurl {
2017-07-31 22:27:29 +01:00
url = "https://github.com/lcn2/calc/releases/download/${version}/${name}.tar.bz2";
calc: 2.12.6.3 -> 2.12.6.6 Semi-automatic update. These checks were done: - built on NixOS - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -V` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere -h` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere --help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/4dsphere help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/fproduct help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/mersenne help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/piforever -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/piforever -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus version` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus --help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/plus help` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/powerterm help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/simple -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/cscript/square -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/calc -v` and found version 2.12.6.6 - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped -h` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped --help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped help` got 0 exit code - ran `/nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6/bin/.calc-wrapped -v` and found version 2.12.6.6 - found 2.12.6.6 with grep in /nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6 - found 2.12.6.6 in filename of file in /nix/store/mdjaq6pgxp9qrfg9s7iaavj2rsvjqh9q-calc-2.12.6.6
2018-03-08 04:08:56 +00:00
sha256 = "03sg1xhin6qsrz82scf96mmzw8lz1yj68rhj4p4npp4s0fawc9d5";
2016-02-24 21:47:21 +00:00
};
buildInputs = [ makeWrapper readline ncurses utillinux ];
2016-02-24 21:47:21 +00:00
configurePhase = ''
sed -i 's/all: check_include/all:/' Makefile
'';
buildPhase = ''
make ${makeFlags}
'';
installPhase = ''
make install ${makeFlags}
wrapProgram $out/bin/calc --prefix LD_LIBRARY_PATH : $out/lib
'';
# Hack to avoid TMPDIR in RPATHs.
preFixup = ''rm -rf "$(pwd)" '';
2016-02-24 21:47:21 +00:00
meta = {
description = "C-style arbitrary precision calculator";
homepage = http://www.isthe.com/chongo/tech/comp/calc/;
license = licenses.lgpl21;
maintainers = [ ];
platforms = platforms.all;
};
}