From e48a0365d2d67410cb701b028d2a70c271d2ea3d Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Mon, 23 Sep 2024 14:18:10 +0800 Subject: [PATCH] emacsPackages: fix build for nongnu packages --- .../nongnu-common-overrides.nix | 19 ++++++++++++++++++- .../elisp-packages/nongnu-devel-packages.nix | 14 ++++++++++++-- .../emacs/elisp-packages/nongnu-packages.nix | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/nongnu-common-overrides.nix b/pkgs/applications/editors/emacs/elisp-packages/nongnu-common-overrides.nix index d6ac00a3a817..f59b607202b8 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/nongnu-common-overrides.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/nongnu-common-overrides.nix @@ -1,8 +1,25 @@ -pkgs: +pkgs: lib: self: super: +let + inherit (import ./lib-override-helper.nix pkgs lib) + addPackageRequires + ; +in { + # missing optional dependencies + haskell-tng-mode = addPackageRequires super.haskell-tng-mode ( + with self; + [ + s + company + projectile + smartparens + yasnippet + ] + ); + p4-16-mode = super.p4-16-mode.overrideAttrs { # workaround https://github.com/NixOS/nixpkgs/issues/301795 prePatch = '' diff --git a/pkgs/applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix index 8cbcd0a71119..bba1f73f02af 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix @@ -19,6 +19,10 @@ self: let + inherit (import ./lib-override-helper.nix pkgs lib) + addPackageRequires + ; + generateNongnu = lib.makeOverridable ( { generated ? ./nongnu-devel-generated.nix, @@ -39,9 +43,15 @@ let super = imported; - commonOverrides = import ./nongnu-common-overrides.nix pkgs; + commonOverrides = import ./nongnu-common-overrides.nix pkgs lib; - overrides = self: super: { }; + overrides = self: super: { + # missing optional dependencies + haskell-tng-mode = addPackageRequires super.haskell-tng-mode [ + self.shut-up + self.lsp-mode + ]; + }; in let diff --git a/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix index 4466621b3926..139bdaf6260a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/nongnu-packages.nix @@ -29,7 +29,7 @@ self: let super = imported; - commonOverrides = import ./nongnu-common-overrides.nix pkgs; + commonOverrides = import ./nongnu-common-overrides.nix pkgs lib; overrides = self: super: { };