From 43935736f6d5d8860f0c4e63b630eb945ca36490 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 10 Mar 2018 12:57:55 +0100 Subject: [PATCH] alot: move to own module --- .../python-modules/alot/default.nix | 48 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 45 +---------------- 2 files changed, 49 insertions(+), 44 deletions(-) create mode 100644 pkgs/development/python-modules/alot/default.nix diff --git a/pkgs/development/python-modules/alot/default.nix b/pkgs/development/python-modules/alot/default.nix new file mode 100644 index 00000000000..67cd7eafd12 --- /dev/null +++ b/pkgs/development/python-modules/alot/default.nix @@ -0,0 +1,48 @@ +{ stdenv, buildPythonPackage, fetchFromGitHub, isPy3k +, notmuch, urwid, urwidtrees, twisted, python_magic, configobj, pygpgme, mock, file, gpgme}: + +buildPythonPackage rec { + version = "0.5.1"; + pname = "alot"; + + disabled = isPy3k; + + src = fetchFromGitHub { + owner = "pazz"; + repo = pname; + rev = "version"; + sha256 = "0ipkhc5wllfq78lg47aiq4qih0yjq8ad9xkrbgc88xk8pk9166i8"; + }; + + postPatch = '' + substituteInPlace alot/defaults/alot.rc.spec \ + --replace "themes_dir = string(default=None)" \ + "themes_dir = string(default='$out/share/themes')" + ''; + + propagatedBuildInputs = [ + notmuch + urwid + urwidtrees + twisted + python_magic + configobj + pygpgme + mock + file + ]; + + postInstall = '' + mkdir -p $out/share + cp -r extra/themes $out/share + wrapProgram $out/bin/alot \ + --prefix LD_LIBRARY_PATH : '${stdenv.lib.makeLibraryPath [ notmuch file gpgme ]}' + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/pazz/alot; + description = "Terminal MUA using notmuch mail"; + platforms = platforms.linux; + maintainers = with maintainers; [ garbas ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c56e8642abb..b5865d21252 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -468,50 +468,7 @@ in { python-sybase = callPackage ../development/python-modules/sybase {}; - alot = buildPythonPackage rec { - rev = "0.5.1"; - name = "alot-${rev}"; - - disabled = isPy3k; - - src = pkgs.fetchFromGitHub { - owner = "pazz"; - repo = "alot"; - inherit rev; - sha256 = "0ipkhc5wllfq78lg47aiq4qih0yjq8ad9xkrbgc88xk8pk9166i8"; - }; - - postPatch = '' - substituteInPlace alot/defaults/alot.rc.spec \ - --replace "themes_dir = string(default=None)" \ - "themes_dir = string(default='$out/share/themes')" - ''; - - propagatedBuildInputs = - [ self.notmuch - self.urwid - self.urwidtrees - self.twisted - self.python_magic - self.configobj - self.pygpgme - self.mock - ]; - - postInstall = '' - mkdir -p $out/share - cp -r extra/themes $out/share - wrapProgram $out/bin/alot \ - --prefix LD_LIBRARY_PATH : '${pkgs.lib.makeLibraryPath [ pkgs.notmuch pkgs.file pkgs.gpgme ]}' - ''; - - meta = { - homepage = https://github.com/pazz/alot; - description = "Terminal MUA using notmuch mail"; - platforms = platforms.linux; - maintainers = with maintainers; [ garbas ]; - }; - }; + alot = callPackage ../development/python-modules/alot {}; anyjson = buildPythonPackage rec { name = "anyjson-0.3.3";