From 00209911b0cdb76b8ec53c4be595e5a0349ba472 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Fri, 26 Oct 2018 12:59:52 -0400 Subject: [PATCH] pythonPackages.ruamel_yaml: refactor move to python-modules --- .../python-modules/ruamel_yaml/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 22 +------------ 2 files changed, 32 insertions(+), 21 deletions(-) create mode 100644 pkgs/development/python-modules/ruamel_yaml/default.nix diff --git a/pkgs/development/python-modules/ruamel_yaml/default.nix b/pkgs/development/python-modules/ruamel_yaml/default.nix new file mode 100644 index 000000000000..59674d82c90c --- /dev/null +++ b/pkgs/development/python-modules/ruamel_yaml/default.nix @@ -0,0 +1,31 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, ruamel_base +, typing +, ruamel_ordereddict +, isPy3k +}: + +buildPythonPackage rec { + pname = "ruamel.yaml"; + version = "0.15.35"; + + src = fetchPypi { + inherit pname version; + sha256 = "0xggyfaj6vprggahf7cq8kp9j79rb7hn8ndk3bxj2sxvwhhliiwd"; + }; + + # Tests cannot load the module to test + doCheck = false; + + propagatedBuildInputs = [ ruamel_base typing ] + ++ stdenv.lib.optional (!isPy3k) ruamel_ordereddict; + + meta = with stdenv.lib; { + description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"; + homepage = https://bitbucket.org/ruamel/yaml; + license = licenses.mit; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 851e0e44bda4..7088405ccf86 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3664,27 +3664,7 @@ in { typeguard = callPackage ../development/python-modules/typeguard { }; - ruamel_yaml = buildPythonPackage rec { - name = "ruamel.yaml-${version}"; - version = "0.15.35"; - - src = pkgs.fetchurl { - url = "mirror://pypi/r/ruamel.yaml/${name}.tar.gz"; - sha256 = "0xggyfaj6vprggahf7cq8kp9j79rb7hn8ndk3bxj2sxvwhhliiwd"; - }; - - # Tests cannot load the module to test - doCheck = false; - - propagatedBuildInputs = with self; [ ruamel_base typing ] ++ - (optional (!isPy3k) self.ruamel_ordereddict); - - meta = { - description = "YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order"; - homepage = https://bitbucket.org/ruamel/yaml; - license = licenses.mit; - }; - }; + ruamel_yaml = callPackage ../development/python-modules/ruamel_yaml { }; runsnakerun = buildPythonPackage rec { name = "runsnakerun-2.0.4";