2016-01-16 23:20:06 +00:00
|
|
|
# builder for Emacs packages built for packages.el
|
|
|
|
|
2021-06-12 17:21:35 +01: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 17:21:35 +01:00
|
|
|
import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
|
2016-01-16 23:20:06 +00:00
|
|
|
|
2021-08-16 20:32:45 +01: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 15:49:08 +01: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"
|
|
|
|
])
|