From 48d62293522c957330378bcb6f68ef42dae24323 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Wed, 17 Oct 2018 14:19:42 -0400 Subject: [PATCH] pythonPackages.notmuch: refactor move to python-modules --- .../python-modules/notmuch/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +------------- 2 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/notmuch/default.nix diff --git a/pkgs/development/python-modules/notmuch/default.nix b/pkgs/development/python-modules/notmuch/default.nix new file mode 100644 index 00000000000..207e59b8501 --- /dev/null +++ b/pkgs/development/python-modules/notmuch/default.nix @@ -0,0 +1,28 @@ +{ stdenv +, buildPythonPackage +, pkgs +, python +}: + +buildPythonPackage rec { + name = "python-${pkgs.notmuch.name}"; + + src = pkgs.notmuch.src; + + sourceRoot = pkgs.notmuch.pythonSourceRoot; + + buildInputs = [ python pkgs.notmuch ]; + + postPatch = '' + sed -i -e '/CDLL/s@"libnotmuch\.@"${pkgs.notmuch}/lib/libnotmuch.@' \ + notmuch/globals.py + ''; + + meta = with stdenv.lib; { + description = "A Python wrapper around notmuch"; + homepage = https://notmuchmail.org/; + license = licenses.gpl3; + maintainers = with maintainers; [ garbas ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index b1c854fbe7c..d676ced41f6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2942,26 +2942,7 @@ in { notify2 = callPackage ../development/python-modules/notify2 {}; - notmuch = buildPythonPackage rec { - name = "python-${pkgs.notmuch.name}"; - - src = pkgs.notmuch.src; - - sourceRoot = pkgs.notmuch.pythonSourceRoot; - - buildInputs = with self; [ python pkgs.notmuch ]; - - postPatch = '' - sed -i -e '/CDLL/s@"libnotmuch\.@"${pkgs.notmuch}/lib/libnotmuch.@' \ - notmuch/globals.py - ''; - - meta = { - description = "A Python wrapper around notmuch"; - homepage = https://notmuchmail.org/; - maintainers = with maintainers; [ garbas ]; - }; - }; + notmuch = callPackage ../development/python-modules/notmuch { }; emoji = callPackage ../development/python-modules/emoji { };