1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 12:42:24 +00:00
nixpkgs/pkgs/data/misc/conway_polynomials/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ lib, stdenv
2018-04-24 22:29:32 +01:00
, fetchurl
2021-12-06 00:44:37 +00:00
, python3
2018-04-24 22:29:32 +01:00
}:
stdenv.mkDerivation rec {
pname = "conway_polynomials";
2018-04-24 22:29:32 +01: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 {
2021-12-06 00:44:37 +00:00
url = "https://git.sagemath.org/sage.git/plain/build/pkgs/conway_polynomials/spkg-install.py?id=9.2";
sha256 = "1bwnqasnyv793hxg29viing4dnliz29grkhldsirq19d509yk1fs";
2018-04-24 22:29:32 +01: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 00:44:37 +00:00
${python3.interpreter} ${spkg-install}
2018-04-24 22:29:32 +01:00
'';
meta = with lib; {
description = "Contains a small database of Conway polynomials";
2018-04-24 22:29:32 +01:00
license = licenses.gpl2;
platforms = platforms.all;
maintainers = teams.sage.members;
2018-04-24 22:29:32 +01:00
};
}