Filter nix-buffer packages

Null packages cause an error
This commit is contained in:
Matthew Justin Bauer 2018-02-11 21:52:16 -06:00 committed by GitHub
parent 0fb2ac4e20
commit 5b59084e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,8 @@
{ lib, writeText, inherit-local }:
rec {
withPackages = pkgs: let
withPackages = pkgs': let
pkgs = builtins.filter (x: x != null) pkgs';
extras = map (x: x.emacsBufferSetup pkgs) (builtins.filter (builtins.hasAttr "emacsBufferSetup") pkgs);
in writeText "dir-locals.el" ''
(require 'inherit-local "${inherit-local}/share/emacs/site-lisp/elpa/inherit-local-${inherit-local.version}/inherit-local.elc")