2016-01-16 23:20:06 +00:00
|
|
|
# builder for Emacs packages built for packages.el
|
|
|
|
|
2021-06-12 16:21:35 +00:00
|
|
|
{ lib, stdenv, emacs, texinfo, writeText, gcc }:
|
2016-01-16 23:20:06 +00:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{ pname
|
|
|
|
, version
|
|
|
|
, src
|
2020-12-10 21:31:49 +00:00
|
|
|
, meta ? {}
|
2016-01-16 23:20:06 +00:00
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
|
2020-12-10 21:31:49 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
defaultMeta = {
|
|
|
|
homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2021-06-12 16:21:35 +00:00
|
|
|
import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
|
2016-01-16 23:20:06 +00:00
|
|
|
|
2021-08-16 19:32:45 +00:00
|
|
|
dontUnpack = true;
|
2016-01-16 23:20:06 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
emacs --batch -Q -l ${./elpa2nix.el} \
|
|
|
|
-f elpa2nix-install-package \
|
2021-06-30 14:49:08 +00:00
|
|
|
"$src" "$out/share/emacs/site-lisp/elpa"
|
2016-01-16 23:20:06 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2020-12-10 21:31:49 +00:00
|
|
|
|
|
|
|
meta = defaultMeta // meta;
|
2016-01-16 23:20:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// removeAttrs args [ "files" "fileSpecs"
|
|
|
|
"meta"
|
|
|
|
])
|