mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 10:31:36 +00:00
e4a4e109ba
This simplifies melpa builder by merging with it my old emacs modes builder, adds better instructions and support for overrides in emacs-packages.nix, and renames some emacs-related stuff in all-packages.nix for sanity reasons. I declare this backwards compatible since direct uses of emacsPackages in configuration.nix are very unlikely.
42 lines
714 B
Nix
42 lines
714 B
Nix
# generic builder for Emacs packages
|
|
|
|
{ lib, stdenv, emacs, texinfo }:
|
|
|
|
with lib;
|
|
|
|
{ pname
|
|
, version ? null
|
|
|
|
, buildInputs ? []
|
|
, packageRequires ? []
|
|
|
|
, meta ? {}
|
|
|
|
, ...
|
|
}@args:
|
|
|
|
let
|
|
defaultMeta = {
|
|
broken = false;
|
|
platforms = emacs.meta.platforms;
|
|
};
|
|
in
|
|
|
|
stdenv.mkDerivation ({
|
|
name = "emacs-${pname}${optionalString (version != null) "-${version}"}";
|
|
|
|
buildInputs = [emacs texinfo] ++ packageRequires ++ buildInputs;
|
|
propagatedBuildInputs = packageRequires;
|
|
propagatedUserEnvPkgs = packageRequires;
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
doCheck = false;
|
|
|
|
meta = defaultMeta // meta;
|
|
}
|
|
|
|
// removeAttrs args [ "buildInputs" "packageRequires"
|
|
"meta"
|
|
])
|