2016-01-17 00:20:06 +01:00
|
|
|
# builder for Emacs packages built for packages.el
|
|
|
|
|
2018-07-21 02:44:44 +02:00
|
|
|
{ lib, stdenv, emacs, texinfo }:
|
2016-01-17 00:20:06 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{ pname
|
|
|
|
, version
|
|
|
|
, src
|
2020-12-10 22:31:49 +01:00
|
|
|
, meta ? {}
|
2016-01-17 00:20:06 +01:00
|
|
|
, ...
|
|
|
|
}@args:
|
|
|
|
|
2020-12-10 22:31:49 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
defaultMeta = {
|
|
|
|
homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html";
|
|
|
|
};
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2016-01-17 00:20:06 +01:00
|
|
|
import ./generic.nix { inherit lib stdenv emacs texinfo; } ({
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
2020-12-10 22:31:49 +01:00
|
|
|
|
|
|
|
meta = defaultMeta // meta;
|
2016-01-17 00:20:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// removeAttrs args [ "files" "fileSpecs"
|
|
|
|
"meta"
|
|
|
|
])
|