mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 02:03:01 +00:00
88cd726556
elpaBuild: Delay src evaluation so it can be overridden
42 lines
744 B
Nix
42 lines
744 B
Nix
# builder for Emacs packages built for packages.el
|
|
|
|
{ lib, stdenv, emacs, texinfo, writeText, gcc }:
|
|
|
|
with lib;
|
|
|
|
{ pname
|
|
, version
|
|
, src
|
|
, meta ? {}
|
|
, ...
|
|
}@args:
|
|
|
|
let
|
|
|
|
defaultMeta = {
|
|
homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html";
|
|
};
|
|
|
|
in
|
|
|
|
import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
|
|
|
|
phases = "installPhase fixupPhase distPhase";
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
emacs --batch -Q -l ${./elpa2nix.el} \
|
|
-f elpa2nix-install-package \
|
|
"$src" "$out/share/emacs/site-lisp/elpa"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = defaultMeta // meta;
|
|
}
|
|
|
|
// removeAttrs args [ "files" "fileSpecs"
|
|
"meta"
|
|
])
|