Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 1.2 kB view raw
1{ stdenv 2, buildPythonPackage 3, fetchFromGitHub 4, isPyPy 5, isPy3k 6, cython 7, numpy 8, pkgs 9}: 10 11buildPythonPackage rec { 12 version = "0.7.2"; 13 pname = "dynd"; 14 disabled = isPyPy || !isPy3k; # tests fail on python2, 2018-04-11 15 16 src = pkgs.fetchFromGitHub { 17 owner = "libdynd"; 18 repo = "dynd-python"; 19 rev = "v${version}"; 20 sha256 = "19igd6ibf9araqhq9bxmzbzdz05vp089zxvddkiik3b5gb7l17nh"; 21 }; 22 23 # setup.py invokes git on build but we're fetching a tarball, so 24 # can't retrieve git version. We hardcode: 25 preConfigure = '' 26 substituteInPlace setup.py --replace "ver = check_output(['git', 'describe', '--dirty'," "ver = '${version}'" 27 substituteInPlace setup.py --replace "'--always', '--match', 'v*']).decode('ascii').strip('\n')" "" 28 ''; 29 30 # Python 3 works but has a broken import test that I couldn't 31 # figure out. 32 doCheck = !isPy3k; 33 buildInputs = [ pkgs.cmake pkgs.libdynd.dev cython ]; 34 propagatedBuildInputs = [ numpy pkgs.libdynd ]; 35 36 meta = with stdenv.lib; { 37 homepage = http://libdynd.org; 38 license = licenses.bsd2; 39 description = "Python exposure of dynd"; 40 maintainers = with maintainers; [ teh ]; 41 }; 42 43}