diff --git a/pkgs/development/python-modules/rdflib/default.nix b/pkgs/development/python-modules/rdflib/default.nix new file mode 100644 index 000000000000..cdbba1806735 --- /dev/null +++ b/pkgs/development/python-modules/rdflib/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isodate +, html5lib +, SPARQLWrapper +, networkx +, nose +, python +}: + +buildPythonPackage rec { + pname = "rdflib"; + version = "4.2.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs"; + }; + + propagatedBuildInputs = [isodate html5lib SPARQLWrapper ]; + + checkInputs = [ networkx nose ]; + + # Python 2 syntax + # Failing doctest + doCheck = false; + + checkPhase = '' + ${python.interpreter} run_tests.py + ''; + + meta = { + description = "A Python library for working with RDF, a simple yet powerful language for representing information"; + homepage = http://www.rdflib.net/; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ddf1edef32af..a09fa9a66e00 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -15440,24 +15440,7 @@ in { }; - rdflib = buildPythonPackage (rec { - name = "rdflib-4.2.2"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/rdflib/${name}.tar.gz"; - sha256 = "0398c714znnhaa2x7v51b269hk20iz073knq2mvmqp2ma92z27fs"; - }; - - # error: invalid command 'test' - doCheck = false; - - propagatedBuildInputs = with self; [ isodate html5lib SPARQLWrapper ]; - - meta = { - description = "A Python library for working with RDF, a simple yet powerful language for representing information"; - homepage = http://www.rdflib.net/; - }; - }); + rdflib = callPackage ../development/python-modules/rdflib { }; isodate = buildPythonPackage rec { name = "isodate-${version}";