2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv
|
2018-04-24 23:29:32 +02:00
|
|
|
, fetchurl
|
2021-12-06 01:44:37 +01:00
|
|
|
, python3
|
2018-04-24 23:29:32 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "conway_polynomials";
|
2018-04-24 23:29:32 +02:00
|
|
|
version = "0.5";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://sageupstream/conway_polynomials/conway_polynomials-${version}.tar.bz2";
|
|
|
|
sha256 = "05zb1ly9x2bbscqv0jgc45g48xx77mfs7qdbqhn4ihmihn57iwnq";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Script that creates the "database" (nested python array) and pickles it
|
|
|
|
spkg-install = fetchurl {
|
2023-09-02 17:46:11 +02:00
|
|
|
url = "https://raw.githubusercontent.com/sagemath/sage/9.2/build/pkgs/conway_polynomials/spkg-install.py";
|
2021-12-06 01:44:37 +01:00
|
|
|
sha256 = "1bwnqasnyv793hxg29viing4dnliz29grkhldsirq19d509yk1fs";
|
2018-04-24 23:29:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
# directory layout as spkg-install.py expects
|
|
|
|
dir="$PWD"
|
|
|
|
cd ..
|
|
|
|
ln -s "$dir" "src"
|
|
|
|
|
|
|
|
# environment spkg-install.py expects
|
|
|
|
mkdir -p "$out/share"
|
|
|
|
export SAGE_SHARE="$out/share"
|
|
|
|
export PYTHONPATH=$PWD
|
|
|
|
|
2021-12-06 01:44:37 +01:00
|
|
|
${python3.interpreter} ${spkg-install}
|
2018-04-24 23:29:32 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-10-11 07:55:05 +02:00
|
|
|
description = "Contains a small database of Conway polynomials";
|
2018-04-24 23:29:32 +02:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
2020-11-17 20:41:33 +01:00
|
|
|
maintainers = teams.sage.members;
|
2018-04-24 23:29:32 +02:00
|
|
|
};
|
|
|
|
}
|