I’m trying to wrap a number of packages up with Emacs to get an environment that contains all package executables as well as other things like man and info pages. I’ve gotten this working with executables, but can’t figure out how to get the share directory outputs as well (and potentially any other outputs I’d get from installing packages in the global environment). Here’s what I’ve got so far.
{ stdenv, pkgs }:
let
# TODO how can I include man and info pages?
# searchPath = stdenv.lib.makeSearchPath "share" (with pkgs; [
# # documentation
# clang-manpages
# llvm-manpages
# stdman # cppreference manpages
# stdmanpages
# posix_man_pages
# glibcInfo
# ]);
# perl-with-packages = pkgs.perl.withPackages(p: with p; [
# RPCEPCService
# DBI
# DBDPg
# ]);
binPath = stdenv.lib.makeBinPath (with pkgs; [
gdb
clang-tools
clang-analyzer
bear
[...]
# TODO doesn't work
# needed for edbi
# perl-with-packages
# this doesn't either
# perlPackages.RPCEPCService
# perlPackages.DBI
# perlPackages.DBDPg
]);
emacs-wrapped-with-packages = (pkgs.emacsPackagesGen pkgs.emacs).emacsWithPackages (epkgs: (with epkgs.elpaPackages; [
# all standard and works fine
[...]
]) ++ (with epkgs.melpaPackages; [
[...]
]) ++ (with epkgs.orgPackages; [
[...]
]) ++ (with epkgs; [
[...]
]));
in
pkgs.symlinkJoin {
name = "emacs-wrapped";
paths = with pkgs; [
emacs-wrapped-with-packages
];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram "$out""/bin/emacs" \
--suffix PATH : "${binPath}"
'';
inherit (pkgs.emacs) meta;
}
The makeSearchPath
at the top was an attempt at the share directory, but couldn’t get it to work. Anyone know of a way to do this?