1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 boost, 8 gfal2, 9 glib, 10 pythonAtLeast, 11 # For tests 12 gfal2-util ? null, 13}: 14buildPythonPackage rec { 15 pname = "gfal2-python"; 16 version = "1.13.0"; 17 format = "setuptools"; 18 src = fetchFromGitHub { 19 owner = "cern-fts"; 20 repo = "gfal2-python"; 21 rev = "v${version}"; 22 hash = "sha256-TF8EwT1UEtB9lhfq8Jkn9rrSkSxMSLzuAywfB23K1kE="; 23 }; 24 nativeBuildInputs = [ 25 cmake 26 pkg-config 27 ]; 28 buildInputs = [ 29 boost 30 gfal2 31 glib 32 ]; 33 # We don't want setup.py to (re-)execute cmake in buildPhase 34 # Besides, this package is totally handled by CMake, which means no additional configuration is needed. 35 dontConfigure = true; 36 pythonImportsCheck = [ "gfal2" ]; 37 passthru = { 38 inherit gfal2; 39 tests = { 40 inherit gfal2-util; 41 } 42 // lib.optionalAttrs (gfal2-util != null) gfal2-util.tests or { }; 43 }; 44 meta = with lib; { 45 description = "Python binding for gfal2"; 46 homepage = "https://github.com/cern-fts/gfal2-python"; 47 license = licenses.asl20; 48 maintainers = with maintainers; [ ShamrockLee ]; 49 }; 50}