at 18.09-beta 43 lines 1.2 kB view raw
1{ stdenv 2, fetchurl 3, python 4}: 5 6stdenv.mkDerivation rec { 7 name = "conway_polynomials-${version}"; 8 version = "0.5"; 9 10 pythonEnv = python.withPackages (ps: with ps; [ six ]); 11 12 src = fetchurl { 13 url = "mirror://sageupstream/conway_polynomials/conway_polynomials-${version}.tar.bz2"; 14 sha256 = "05zb1ly9x2bbscqv0jgc45g48xx77mfs7qdbqhn4ihmihn57iwnq"; 15 }; 16 17 # Script that creates the "database" (nested python array) and pickles it 18 spkg-install = fetchurl { 19 url = "https://git.sagemath.org/sage.git/plain/build/pkgs/conway_polynomials/spkg-install.py?id=07d6c37d18811e2b377a9689790a7c5e24da16ba"; 20 sha256 = "0m12nfb37j3bn4bp06ddgnyp2d6z0hg5f83pbbjszxw7vxs33a82"; 21 }; 22 23 installPhase = '' 24 # directory layout as spkg-install.py expects 25 dir="$PWD" 26 cd .. 27 ln -s "$dir" "src" 28 29 # environment spkg-install.py expects 30 mkdir -p "$out/share" 31 export SAGE_SHARE="$out/share" 32 export PYTHONPATH=$PWD 33 34 ${pythonEnv.interpreter} ${spkg-install} 35 ''; 36 37 meta = with stdenv.lib; { 38 description = "Contains a small database of Conway polynomials."; 39 license = licenses.gpl2; 40 platforms = platforms.all; 41 maintainers = with maintainers; [ timokau ]; 42 }; 43}