mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
3618d1d247
- Remove superflous `let` with `defaultMeta` These can just be assigned to meta directly instead. - Hoist internal intermediate derivation - Remove top-level `with lib` - Inherit `lib`/`builtins` into scopes
38 lines
694 B
Nix
38 lines
694 B
Nix
# builder for Emacs packages built for packages.el
|
|
|
|
{ lib, stdenv, emacs, texinfo, writeText, gcc }:
|
|
|
|
let
|
|
handledArgs = [ "files" "fileSpecs" "meta" ];
|
|
genericBuild = import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; };
|
|
|
|
in
|
|
|
|
{ pname
|
|
, version
|
|
, src
|
|
, meta ? {}
|
|
, ...
|
|
}@args:
|
|
|
|
genericBuild ({
|
|
|
|
dontUnpack = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
emacs --batch -Q -l ${./elpa2nix.el} \
|
|
-f elpa2nix-install-package \
|
|
"$src" "$out/share/emacs/site-lisp/elpa"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html";
|
|
} // meta;
|
|
}
|
|
|
|
// removeAttrs args handledArgs)
|