From 74a6022c91ff2032b24eedf4b6808e8ed7866267 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Mon, 29 Oct 2018 14:55:40 -0400 Subject: [PATCH] pythonPackages.mailcap-fix: refactor move to python-modules --- .../python-modules/mailcap-fix/default.nix | 23 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +-------------- 2 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/mailcap-fix/default.nix diff --git a/pkgs/development/python-modules/mailcap-fix/default.nix b/pkgs/development/python-modules/mailcap-fix/default.nix new file mode 100644 index 000000000000..886a3ed66b37 --- /dev/null +++ b/pkgs/development/python-modules/mailcap-fix/default.nix @@ -0,0 +1,23 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy36 +}: + +buildPythonPackage rec { + pname = "mailcap-fix"; + version = "1.0.1"; + disabled = isPy36; # this fix is merged into python 3.6 + + src = fetchPypi { + inherit pname version; + sha256 = "02lijkq6v379r8zkqg9q2srin3i80m4wvwik3hcbih0s14v0ng0i"; + }; + + meta = with stdenv.lib; { + description = "A patched mailcap module that conforms to RFC 1524"; + homepage = "https://github.com/michael-lazar/mailcap_fix"; + license = licenses.unlicense; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1cf038accb6d..64a0bf0414b5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4467,23 +4467,7 @@ in { suds-jurko = callPackage ../development/python-modules/suds-jurko { }; - mailcap-fix = buildPythonPackage rec { - name = "mailcap-fix-${version}"; - version = "1.0.1"; - - disabled = isPy36; # this fix is merged into python 3.6 - - src = pkgs.fetchurl { - url = "mirror://pypi/m/mailcap-fix/${name}.tar.gz"; - sha256 = "02lijkq6v379r8zkqg9q2srin3i80m4wvwik3hcbih0s14v0ng0i"; - }; - - meta = with stdenv.lib; { - description = "A patched mailcap module that conforms to RFC 1524"; - homepage = "https://github.com/michael-lazar/mailcap_fix"; - license = licenses.unlicense; - }; - }; + mailcap-fix = callPackage ../development/python-modules/mailcap-fix { }; maildir-deduplicate = buildPythonPackage rec { name = "maildir-deduplicate-${version}";