Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at flake-libs 53 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 cython, 6 fetchFromGitHub, 7 libstatgrab, 8 pkg-config, 9 pythonOlder, 10 setuptools, 11 unittestCheckHook, 12}: 13 14buildPythonPackage rec { 15 pname = "pystatgrab"; 16 version = "0.7.2"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchFromGitHub { 22 owner = "libstatgrab"; 23 repo = "pystatgrab"; 24 rev = "PYSTATGRAB_${lib.replaceStrings [ "." ] [ "_" ] version}"; 25 hash = "sha256-0FDhkIK8jy3/SFmCzrl9l4RTeIKDjO0o5UoODx6Wnfs="; 26 }; 27 28 build-system = [ setuptools ]; 29 30 nativeBuildInputs = [ 31 cython 32 pkg-config 33 ]; 34 35 buildInputs = [ libstatgrab ]; 36 37 nativeCheckInputs = [ unittestCheckHook ]; 38 39 pythonImportsCheck = [ "statgrab" ]; 40 41 # Tests don't work on darwin due to seg fault 42 doCheck = !stdenv.hostPlatform.isDarwin; 43 44 meta = with lib; { 45 description = "Python bindings for libstatgrab"; 46 homepage = "https://github.com/libstatgrab/pystatgrab"; 47 changelog = "https://github.com/libstatgrab/pystatgrab/blob/PYSTATGRAB_${ 48 lib.replaceStrings [ "." ] [ "_" ] version 49 }/NEWS"; 50 license = licenses.lgpl21Only; 51 maintainers = with maintainers; [ fab ]; 52 }; 53}