From 96b0956aeefa40741b65dcf5d57deb741ec3bba0 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sat, 12 Nov 2022 14:00:37 -0300 Subject: [PATCH] emacs.pkgs.ghc-mod: 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/ghc-mod/default.nix | 27 +++++++++++++++++++ .../emacs/elisp-packages/manual-packages.nix | 22 +-------------- 2 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 pkgs/applications/editors/emacs/elisp-packages/ghc-mod/default.nix diff --git a/pkgs/applications/editors/emacs/elisp-packages/ghc-mod/default.nix b/pkgs/applications/editors/emacs/elisp-packages/ghc-mod/default.nix new file mode 100644 index 000000000000..533c63608ab7 --- /dev/null +++ b/pkgs/applications/editors/emacs/elisp-packages/ghc-mod/default.nix @@ -0,0 +1,27 @@ +{ lib +, pkgs +, melpaBuild +, haskellPackages +, writeText +}: + +melpaBuild { + pname = "ghc"; + + inherit (haskellPackages.ghc-mod) version src; + + packageRequires = [ haskell-mode ]; + + propagatedUserEnvPkgs = [ haskellPackages.ghc-mod ]; + + recipe = writeText "recipe" '' + (ghc-mod :repo "DanielG/ghc-mod" :fetcher github :files ("elisp/*.el")) + ''; + + fileSpecs = [ "elisp/*.el" ]; + + meta = { + description = "An extension of haskell-mode that provides completion of symbols and documentation browsing"; + license = lib.licenses.bsd3; + }; +} diff --git a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix index 64f81c97250d..b0dda76987e8 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/manual-packages.nix @@ -4,27 +4,7 @@ self: with self; { elisp-ffi = callPackage ./elisp-ffi { }; - ghc-mod = melpaBuild { - pname = "ghc"; - version = pkgs.haskellPackages.ghc-mod.version; - - src = pkgs.haskellPackages.ghc-mod.src; - - packageRequires = [ haskell-mode ]; - - propagatedUserEnvPkgs = [ pkgs.haskellPackages.ghc-mod ]; - - recipe = pkgs.writeText "recipe" '' - (ghc-mod :repo "DanielG/ghc-mod" :fetcher github :files ("elisp/*.el")) - ''; - - fileSpecs = [ "elisp/*.el" ]; - - meta = { - description = "An extension of haskell-mode that provides completion of symbols and documentation browsing"; - license = lib.licenses.bsd3; - }; - }; + ghc-mod = callPackage ./elisp-ffi { }; haskell-unicode-input-method = let rev = "d8d168148c187ed19350bb7a1a190217c2915a63";