2018-04-24 22:29:32 +01:00
|
|
|
{ stdenv
|
|
|
|
, fetchurl
|
|
|
|
, python
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "conway_polynomials";
|
2018-04-24 22:29:32 +01:00
|
|
|
version = "0.5";
|
|
|
|
|
|
|
|
pythonEnv = python.withPackages (ps: with ps; [ six ]);
|
|
|
|
|
|
|
|
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 {
|
|
|
|
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/conway_polynomials/spkg-install.py?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
|
|
|
|
sha256 = "0m12nfb37j3bn4bp06ddgnyp2d6z0hg5f83pbbjszxw7vxs33a82";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
${pythonEnv.interpreter} ${spkg-install}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "Contains a small database of Conway polynomials";
|
2018-04-24 22:29:32 +01:00
|
|
|
license = licenses.gpl2;
|
|
|
|
platforms = platforms.all;
|
2020-11-17 19:41:33 +00:00
|
|
|
maintainers = teams.sage.members;
|
2018-04-24 22:29:32 +01:00
|
|
|
};
|
|
|
|
}
|