1x@{builderDefsPackage
2 , gmp, bison, perl, autoconf, ncurses, readline
3 , coreutils
4 , ...}:
5builderDefsPackage
6(a :
7let
8 helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
9 [];
10
11 buildInputs = map (n: builtins.getAttr n x)
12 (builtins.attrNames (builtins.removeAttrs x helperArgNames));
13 sourceInfo = rec {
14 baseName="Singular";
15 version="3-1-2";
16 revision="-1";
17 name="${baseName}-${version}${revision}";
18 url="http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/${name}.tar.gz";
19 hash="04f9i1xar0r7qrrbfki1h9rrmx5y2xg4w7rrvlbx05v2dy6s8djv";
20 };
21in
22rec {
23 src = a.fetchurl {
24 url = sourceInfo.url;
25 sha256 = sourceInfo.hash;
26 };
27
28 inherit (sourceInfo) name version;
29 inherit buildInputs;
30
31 /* doConfigure should be removed if not needed */
32 phaseNames = ["doFixPaths" "doConfigure" "doMakeInstall" "fixInstall"];
33 doFixPaths = a.fullDepEntry (''
34 find . -exec sed -e 's@/bin/rm@${a.coreutils}&@g' -i '{}' ';'
35 find . -exec sed -e 's@/bin/uname@${a.coreutils}&@g' -i '{}' ';'
36 '') ["minInit" "doUnpack"];
37 fixInstall = a.fullDepEntry (''
38 rm -rf "$out/LIB"
39 cp -r Singular/LIB "$out"
40 mkdir -p "$out/bin"
41 ln -s "$out/"*/Singular "$out/bin"
42 '') ["minInit" "defEnsureDir"];
43
44 meta = {
45 description = "A CAS for polynomial computations";
46 maintainers = with a.lib.maintainers;
47 [
48 raskin
49 ];
50 platforms = with a.lib.platforms;
51 linux;
52 license = a.stdenv.lib.licenses.gpl3; # Or GPLv2 at your option - but not GPLv4
53 homepage = "http://www.singular.uni-kl.de/index.php";
54 };
55 passthru = {
56 updateInfo = {
57 downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/";
58 };
59 };
60}) x