From d19c5a23845a22df1da778c41c501b42438dc0f8 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 12 Nov 2022 17:27:23 -0300 Subject: [PATCH] emacs.pkgs.matrix-client: move to a dedicated directory There is no tangible reason to pollute a file like manual-packages with full descriptions of expressions. `callPackage` exists for a reason :) --- .../emacs/elisp-packages/manual-packages.nix | 55 +------------- .../elisp-packages/matrix-client/default.nix | 73 +++++++++++++++++++ 2 files changed, 74 insertions(+), 54 deletions(-) create mode 100644 pkgs/applications/editors/emacs/elisp-packages/matrix-client/default.nix diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix index 2bc0042d860b..fc7d9a8f7cd5 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix @@ -8,60 +8,7 @@ self: with self; { haskell-unicode-input-method = callPackage ./haskell-unicode-input-method { }; - matrix-client = let - rev = "d2ac55293c96d4c95971ed8e2a3f6f354565c5ed"; - in melpaBuild - { - pname = "matrix-client"; - version = "0.3.0"; - - commit = rev; - - src = pkgs.fetchFromGitHub { - owner = "alphapapa"; - repo = "matrix-client.el"; - inherit rev; - sha256 = "1scfv1502yg7x4bsl253cpr6plml1j4d437vci2ggs764sh3rcqq"; - }; - - patches = [ - # Fix: avatar loading when imagemagick support is not available - (pkgs.fetchpatch { - url = "https://github.com/alphapapa/matrix-client.el/commit/5f49e615c7cf2872f48882d3ee5c4a2bff117d07.patch"; - sha256 = "07bvid7s1nv1377p5n61q46yww3m1w6bw4vnd4iyayw3fby1lxbm"; - }) - ]; - - packageRequires = [ - anaphora - cl-lib - self.map - dash-functional - esxml - f - ov - tracking - rainbow-identifiers - dash - s - request - frame-purpose - a - ht - ]; - - recipe = pkgs.writeText "recipe" '' - (matrix-client - :repo "alphapapa/matrix-client.el" - :fetcher github) - ''; - - meta = { - description = "A chat client and API wrapper for Matrix.org"; - license = lib.licenses.gpl3Plus; - }; - - }; + matrix-client = callPackage ./matrix-client { _map = self.map; }; prisma-mode = let rev = "5283ca7403bcb21ca0cac8ecb063600752dfd9d4"; diff --git a/pkgs/applications/editors/emacs/elisp-packages/matrix-client/default.nix b/pkgs/applications/editors/emacs/elisp-packages/matrix-client/default.nix new file mode 100644 index 000000000000..d8efbb9e9cb3 --- /dev/null +++ b/pkgs/applications/editors/emacs/elisp-packages/matrix-client/default.nix @@ -0,0 +1,73 @@ +{ lib +, melpaBuild +, fetchFromGitHub +, fetchpatch +, writeText +# Emacs packages +, _map +, a +, anaphora +, cl-lib +, dash +, dash-functional +, esxml +, f +, frame-purpose +, ht +, ov +, rainbow-identifiers +, request +, s +, tracking +}: + +let + rev = "d2ac55293c96d4c95971ed8e2a3f6f354565c5ed"; +in melpaBuild { + pname = "matrix-client"; + version = "0.3.0"; + + commit = rev; + + src = fetchFromGitHub { + owner = "alphapapa"; + repo = "matrix-client.el"; + inherit rev; + sha256 = "1scfv1502yg7x4bsl253cpr6plml1j4d437vci2ggs764sh3rcqq"; + }; + + patches = [ + # Fix: avatar loading when imagemagick support is not available + (fetchpatch { + url = "https://github.com/alphapapa/matrix-client.el/commit/5f49e615c7cf2872f48882d3ee5c4a2bff117d07.patch"; + sha256 = "07bvid7s1nv1377p5n61q46yww3m1w6bw4vnd4iyayw3fby1lxbm"; + }) + ]; + + packageRequires = [ + _map + a + anaphora + cl-lib + dash + dash-functional + esxml + f + frame-purpose + ht + ov + rainbow-identifiers + request + s + tracking + ]; + + recipe = writeText "recipe" '' + (matrix-client :repo "alphapapa/matrix-client.el" :fetcher github) + ''; + + meta = { + description = "A chat client and API wrapper for Matrix.org"; + license = lib.licenses.gpl3Plus; + }; +}